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

JeffreySu/WeiXinMPSDK

Measured 23 October 2026, 10:58 UTC, at code version 327a77f

Regression: 1 dimension fell since the last survey Boundary Type-Coupling: not measured

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.

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

CAI score 39out of 100 Provisional Down 4 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 large codebase: 326,809 lines of product code in 191 projects, tests not counted · Estimated rebuild effort: about 2.0 person-years · Weakest lens: Security and Compliance, 31

Findings by how serious they are

168 critical 2277 serious 482 minor

6 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, 10:58 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.

The code didn't build, so the score is provisional
Watchdog couldn't build the code: the build stopped with 254 errors. The dimensions that need a working build, such as complexity, duplication and dead code, were measured on an incomplete picture of the code, so their grades and the score are provisional. Fix the build errors and run the survey again for a final score. The first errors: CS0234: The type or namespace name 'AgentKernel' does not exist in the namespace 'Senparc.AI' (are you missing an assembly reference?); MSB4019: The imported project "/usr/share/dotnet/sdk/10.0.400/Microsoft/VisualStudio/v18.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "$(VSToolsPath)/WebApplications/Microsoft.WebApplication.targets", which evaluated to "/usr/share/dotnet/sdk/10.0.400/Microsoft/VisualStudio/v18.0/WebApplications/Microsoft.WebApplication.targets", is correct, and that the file exists on disk.; CS0234: The type or namespace name 'CO2NET' does not exist in the namespace 'Senparc' (are you missing an assembly reference?); CS0234: The type or namespace name 'NeuChar' does not exist in the namespace 'Senparc' (are you missing an assembly reference?); CS0234: The type or namespace name 'Exceptions' does not exist in the namespace 'Senparc.Weixin' (are you missing an assembly reference?); CS0234: The type or namespace name 'MP' does not exist in the namespace 'Senparc.Weixin' (are you missing an assembly reference?)

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 ▸

91of 97 dimensions measured by tools. The other 6 are advisory notes from an AI model, which explain the code but don't count towards the score.
2894of 2927 findings point to an exact file and line, so you can open each one in the code. The other 33 concern the repository as a whole, such as missing documentation.
97dimensions across 7 lenses, read from 326,809 lines of product code in 191 projects.
Chapters

Executive summary

JeffreySu/WeiXinMPSDK scores 39 out of 100, but the score is provisional because the code didn't build, so the ratings below may change once it does.

The weakest lens counts most in the score, and here that is Security and Compliance, which scores 31 and is rated Weak. Its Secrets (history) dimension scores 0 out of 10, and until that reaches 4, Security and Compliance can't be rated higher than Adequate. The first actions are to resolve the 2 End-of-life runtime finding(s) in Platform End-of-Life and to resolve the 1 BlanketAnalyzerSeverityNone finding(s) in Explicit Debt, and if Security and Compliance rose to 70, the score would rise from 39 to about 45.

168 findings are critical: 49 in Secrets (history), 40 in Knowledge Freshness, 25 in Explicit Debt, 20 in Dependency Vulnerabilities, nine in Cryptographic Hygiene, nine in Test Quality, seven in Project dependency cycles, six in Static Analysis (SAST) and three in REDACTED Scanning.

Watchdog couldn't measure Dependency Hygiene, IL Efficiency and Runtime evidence locked — no reproducible boot in this code, so those dimensions are left out of the score. The product code is 326,809 lines, which would take an estimated 2.0 person-years, around €290,000, to rebuild.

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

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Security and Compliance 31 · counts for 46%Code Health 38 · counts for 25%Production Readiness 43 · counts for 14%Accessibility 50 · counts for 8%Performance 60 · counts for 4%Maturity 65 · counts for 2%Architecture 98 · counts for 1%

If Security and Compliance rose from 31 to 70, the lowest score rated Strong, the score would rise from 39 to about 45.

Code composition: what the lines of code are
Business logic 13%Supporting code 65%Tests 22%
New since the last survey: 558 findings

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

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: 1631 findings

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

  • Dependency Hygiene · Vulnerable: Microsoft.Extensions.Caching.Memory
  • Dependency Hygiene · Deprecated: Microsoft.AspNetCore.SignalR
  • Dependency Hygiene · Deprecated: Microsoft.AspNetCore.StaticFiles
  • Explicit Debt · WriteOnlyPrivateField src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3.Test/Apis/Complaint/ComplaintApisTests.cs
  • Static Analysis (SAST) · Medium: REDACTED Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Controllers/BaseController.cs
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/BaseController.cs
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium vulnerability: [GHSA redacted] REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Async correctness · Sync-over-async (deadlock risk) REDACTED
  • Async correctness · Sync-over-async (deadlock risk) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs
  • Async correctness · Sync-over-async (deadlock risk) Samples/All/Senparc.Weixin.Sample.CommonService/TemplateMessageService.cs
  • Async correctness · Sync-over-async (deadlock risk) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayNotifyHandler.cs
  • Async correctness · Sync-over-async (deadlock risk) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayNotifyHandler.cs
  • Async correctness · Sync-over-async (deadlock risk) REDACTED
  • Cancellation propagation · Async method without CancellationToken: RuleDeleteRuleAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Corpgroup/CorpgroupApi.cs
  • Cancellation propagation · Async method without CancellationToken: RuleGetRuleInfoAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Corpgroup/CorpgroupApi.cs
  • Cancellation propagation · Async method without CancellationToken: RuleAddRuleAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Corpgroup/CorpgroupApi.cs
  • Cancellation propagation · Async method without CancellationToken: RuleModifyRuleAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Corpgroup/CorpgroupApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetLinkListAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerAcquisition/CustomerAcquisitionApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetLinkDetailAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerAcquisition/CustomerAcquisitionApi.cs
  • Cancellation propagation · Async method without CancellationToken: CreateLinkAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerAcquisition/CustomerAcquisitionApi.cs
  • Cancellation propagation · Async method without CancellationToken: ModifyLinkAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerAcquisition/CustomerAcquisitionApi.cs
  • Cancellation propagation · Async method without CancellationToken: DeleteLinkAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerAcquisition/CustomerAcquisitionApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetCustomerTagListAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerTag/CustomerTagApi.cs
  • Cancellation propagation · Async method without CancellationToken: AddCorpCustomerTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerTag/CustomerTagApi.cs
  • Cancellation propagation · Async method without CancellationToken: EditCorpCustomerTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerTag/CustomerTagApi.cs
  • Cancellation propagation · Async method without CancellationToken: DeleteCorpCustomerTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerTag/CustomerTagApi.cs
  • Cancellation propagation · Async method without CancellationToken: ExternalContactMarkTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerTag/CustomerTagApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetConversationRecordsAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/DataIntelligence/DataIntelligenceApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetConversationRecordsAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/DataIntelligence/DataIntelligenceApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetMessageStatisticsAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/DataIntelligence/DataIntelligenceApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetMessageStatisticsAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/DataIntelligence/DataIntelligenceApi.cs
  • Cancellation propagation · Async method without CancellationToken: TransferExternalAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetExternalContactAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupChatListAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupChatGetAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetExternalContactListAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetExternalContactInfoAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetExternalContactInfoBatchAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateExternalContactRemarkAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetFollowUserListAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetUserBehaviorDataAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupChatStatisticOwnerAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupChatStatisticGroupByDayAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetCropTagListAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: AddCropTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: EditCropTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: DeleteCropTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetStrategyTagListAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: AddStrategyTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: EditStrategyTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: DeleteStrategyTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: DeleteStrategyTagAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetMomentListAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetMomentTaskAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: AddContactWayAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: AddContactWayAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: ListContactWayAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateContactWayAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: DeleteContactWayAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: CloseTempChatAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupChat_AddJoinWayAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupChat_GetJoinWayAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupChat_UpdateJoinWayAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupChat_DelJoinWayAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: AddMsgTemplateAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetGroupMsgListV2Async src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetGroupMsgTaskAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetGroupMsgSendResultAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: SendWelcomeMsgAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupWelcomeTemplateAddAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupWelcomeTemplateEditAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupWelcomeTemplateGetAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GroupWelcomeTemplateDelAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetInvoiceInfoAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceApi.cs
  • Cancellation propagation · Async method without CancellationToken: GetInvoiceListInfoAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceApi.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateInvoiceStatusAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceApi.cs
  • Cancellation propagation · Async method without CancellationToken: UpdateInvoiceListStatusAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceApi.cs
  • Cancellation propagation · Async method without CancellationToken: SendTextAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/KF/KFApi.cs
  • Cancellation propagation · Async method without CancellationToken: SendImageAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/KF/KFApi.cs
Rebuild cost: about €290,000 · Estimate
Cost to rebuild€95,000 to €480,000, for 1,583 to 5,016 hours of work, about 2.0 person-years for 1 to 4 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 39. 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.
SizeLarge: 326,809 lines of product code
Comment linesThe estimate prices 183,744 lines. Comment lines count towards the size of 326,809 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 2 End-of-life runtime finding(s) in Platform End-of-Life — start with Senparc.Weixin.Cache.CsRedis.Tests.net8.csproj, Senparc.Weixin.NetCore3Sample.CommonService.csproj.
Raises the score by about 4 points · Low effort · Platform End-of-Life
2
Resolve the 1 BlanketAnalyzerSeverityNone finding(s) in Explicit Debt — start with quality.globalconfig.
Raises the score by about 3 points · Low effort · Explicit Debt
3
Resolve the 7 EmptyCatchBlock finding(s) in Explicit Debt — start with CustomMessageHandler.cs (2), WeixinTrace.cs (2), REDACTED.
Raises the score by about 3 points · Low effort · Explicit Debt

Diagnosis: what the measurements show together

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

If you do one thing first · First action
Fix the build. The code didn't build, so the dimensions that need a working build were measured on an incomplete picture of the code, and every grade in this report is provisional. Once the build works, the next survey gives a final score. The compiler's first errors: CS0234: The type or namespace name 'AgentKernel' does not exist in the namespace 'Senparc.AI' (are you missing an assembly reference?); MSB4019: The imported project "/usr/share/dotnet/sdk/10.0.400/Microsoft/VisualStudio/v18.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "$(VSToolsPath)/WebApplications/Microsoft.WebApplication.targets", which evaluated to "/usr/share/dotnet/sdk/10.0.400/Microsoft/VisualStudio/v18.0/WebApplications/Microsoft.WebApplication.targets", is correct, and that the file exists on disk.; CS0234: The type or namespace name 'CO2NET' does not exist in the namespace 'Senparc' (are you missing an assembly reference?); CS0234: The type or namespace name 'NeuChar' does not exist in the namespace 'Senparc' (are you missing an assembly reference?); CS0234: The type or namespace name 'Exceptions' does not exist in the namespace 'Senparc.Weixin' (are you missing an assembly reference?); CS0234: The type or namespace name 'MP' does not exist in the namespace 'Senparc.Weixin' (are you missing an assembly reference?)
Based on: Solution Shape
Where the investment is most exposed · Value at risk
This code would cost about €290,000 to build again, about 2.0 person-years of work. Its weakest lens is Security and Compliance, at 31 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.

Architecture — bounded-context dependency graph

Each box is a bounded context (its layer projects grouped, or a project count when large); arrows show dependencies between contexts. A shared kernel is where many arrows converge.

arch Weixin.CLI Weixin.CLI Weixin.MCP.Server Weixin.MCP.Server ctx:Samples Samples 6 projects ctx:Weixin Weixin 2 projects ctx:Samples->ctx:Weixin ctx:Weixin.AspNet Weixin.AspNet 2 projects ctx:Samples->ctx:Weixin.AspNet ctx:Weixin.Cache Weixin.Cache 12 projects ctx:Samples->ctx:Weixin.Cache ctx:Weixin.MP Weixin.MP 3 projects ctx:Samples->ctx:Weixin.MP ctx:Weixin.MP.Middleware Weixin.MP.Middleware 2 projects ctx:Samples->ctx:Weixin.MP.Middleware ctx:Weixin.MP.MvcExtension Weixin.MP.MvcExtension 2 projects ctx:Samples->ctx:Weixin.MP.MvcExtension ctx:Weixin.Open Weixin.Open 2 projects ctx:Samples->ctx:Weixin.Open ctx:Weixin.TenPay Weixin.TenPay 5 projects ctx:Samples->ctx:Weixin.TenPay ctx:Weixin.Work Weixin.Work 2 projects ctx:Samples->ctx:Weixin.Work ctx:Weixin.Work.Middleware Weixin.Work.Middleware 2 projects ctx:Samples->ctx:Weixin.Work.Middleware ctx:Weixin.WxOpen Weixin.WxOpen 3 projects ctx:Samples->ctx:Weixin.WxOpen ctx:Weixin.WxOpen.Middleware Weixin.WxOpen.Middleware 2 projects ctx:Samples->ctx:Weixin.WxOpen.Middleware ctx:Weixin.All Weixin.All 2 projects ctx:Weixin.All->ctx:Weixin ctx:Weixin.All->ctx:Weixin.AspNet ctx:Weixin.All->ctx:Weixin.Cache ctx:Weixin.All->ctx:Weixin.MP ctx:Weixin.All->ctx:Weixin.MP.Middleware ctx:Weixin.All->ctx:Weixin.MP.MvcExtension ctx:Weixin.All->ctx:Weixin.Open ctx:Weixin.All->ctx:Weixin.TenPay ctx:Weixin.All->ctx:Weixin.Work ctx:Weixin.All->ctx:Weixin.Work.Middleware ctx:Weixin.All->ctx:Weixin.WxOpen ctx:Weixin.All->ctx:Weixin.WxOpen.Middleware ctx:Weixin.AspNet->ctx:Weixin ctx:Weixin.Cache->ctx:Weixin ctx:Weixin.MP->ctx:Weixin ctx:Weixin.MP.Middleware->ctx:Weixin ctx:Weixin.MP.Middleware->ctx:Weixin.MP ctx:Weixin.MP.MvcExtension->ctx:Weixin.AspNet ctx:Weixin.MP.MvcExtension->ctx:Weixin.MP ctx:Weixin.Open->ctx:Weixin ctx:Weixin.TenPay->ctx:Weixin ctx:Weixin.Work->ctx:Weixin ctx:Weixin.Work.Middleware->ctx:Weixin ctx:Weixin.Work.Middleware->ctx:Weixin.Work ctx:Weixin.WxOpen->ctx:Weixin ctx:Weixin.WxOpen->ctx:Weixin.MP ctx:Weixin.WxOpen.Middleware->ctx:Weixin ctx:Weixin.WxOpen.Middleware->ctx:Weixin.WxOpen __more__ +1 more contexts

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.

324 modules, with 514 dependencies between them. 7 loops run through 16 of the modules, marked above the diagonal.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 TenPayV3.Apis.Entities2 TenPayV3.Entities3 Entities4 TenPayV3.Apis.BasePay5 TenPayV3.Apis.VehicleParking6 Exceptions7 MP.AdvancedAPIs.AutoReply8 Open.ComponentAPIs9 TenPay10 TenPayV3.Apis.FundApp11 TenPayV3.Apis.Security12 Work.AdvancedAPIs.Corpgroup13 Work.Entities14 WxOpen.AdvancedAPIs15 WxOpen.AdvancedAPIs.WxApp16 Senparc.Weixin17 Containers18 MP19 Open20 TenPayV321 Work22 Cache23 MP.AdvancedAPIs.GroupMessage24 MP.AdvancedAPIs.TemplateMessage25 MP.Entities26 Open.Containers27 Open.WxOpenAPIs.GetCategoryJson28 TenPayV3.Apis29 TenPayV3.Helpers30 TenPayV3.TenPayHttpClient31 Work.AdvancedAPIs.External.ExternalJson32 Work.CommonAPIs33 MP.AdvancedAPIs.Media34 MP.AdvancedAPIs.NewTmpl35 MP.CommonAPIs36 MP.Containers37 Open.WxOpenAPIs38 Work.AdvancedAPIs39 MP.AdvancedAPIs40 Open.WxaAPIs
1 TenPayV3.Apis.Entities
2 TenPayV3.Entities
3 Entities6
4 TenPayV3.Apis.BasePay102
5 TenPayV3.Apis.VehicleParking61
6 Exceptions1
7 MP.AdvancedAPIs.AutoReply16
8 Open.ComponentAPIs2010
9 TenPay2
10 TenPayV3.Apis.FundApp1111
11 TenPayV3.Apis.Security211
12 Work.AdvancedAPIs.Corpgroup1
13 Work.Entities962
14 WxOpen.AdvancedAPIs3
15 WxOpen.AdvancedAPIs.WxApp5
16 Senparc.Weixin22
17 Containers11
18 MP621
19 Open113
20 TenPayV321632211
21 Work431
22 Cache2
23 MP.AdvancedAPIs.GroupMessage41
24 MP.AdvancedAPIs.TemplateMessage52
25 MP.Entities862
26 Open.Containers84
27 Open.WxOpenAPIs.GetCategoryJson11
28 TenPayV3.Apis931622617
29 TenPayV3.Helpers1224
30 TenPayV3.TenPayHttpClient2221
31 Work.AdvancedAPIs.External.ExternalJson211
32 Work.CommonAPIs171
33 MP.AdvancedAPIs.Media1113
34 MP.AdvancedAPIs.NewTmpl11
35 MP.CommonAPIs149
36 MP.Containers1136
37 Open.WxOpenAPIs61
38 Work.AdvancedAPIs151829
39 MP.AdvancedAPIs4412175611
40 Open.WxaAPIs31711
Uses a module listed above itPart of a loopThe module itself
1 TenPayV3.Apis.Entities2 TenPayV3.Entities3 Entities4 TenPayV3.Apis.BasePay5 TenPayV3.Apis.VehicleParking6 Exceptions7 MP.AdvancedAPIs.AutoReply8 Open.ComponentAPIs9 TenPay10 TenPayV3.Apis.FundApp11 TenPayV3.Apis.Security12 Work.AdvancedAPIs.Corpgroup13 Work.Entities14 WxOpen.AdvancedAPIs15 WxOpen.AdvancedAPIs.WxApp16 Senparc.Weixin17 Containers18 MP19 Open20 TenPayV321 Work22 Cache23 MP.AdvancedAPIs.GroupMessage24 MP.AdvancedAPIs.TemplateMessage25 MP.Entities26 Open.Containers27 Open.WxOpenAPIs.GetCategoryJson28 TenPayV3.Apis29 TenPayV3.Helpers30 TenPayV3.TenPayHttpClient31 Work.AdvancedAPIs.External.ExternalJson32 Work.CommonAPIs33 MP.AdvancedAPIs.Media34 MP.AdvancedAPIs.NewTmpl35 MP.CommonAPIs36 MP.Containers37 Open.WxOpenAPIs38 Work.AdvancedAPIs39 MP.AdvancedAPIs40 Open.WxaAPIsTenPayV3.Apis.Entities1TenPayV3.Entities2Entities3TenPayV3.Apis.BasePay4TenPayV3.Apis.VehicleParking5Exceptions6MP.AdvancedAPIs.AutoReply7Open.ComponentAPIs8TenPay9TenPayV3.Apis.FundApp10TenPayV3.Apis.Security11Work.AdvancedAPIs.Corpgroup12Work.Entities13WxOpen.AdvancedAPIs14WxOpen.AdvancedAPIs.WxApp15Senparc.Weixin16Containers17MP18Open19TenPayV320Work21Cache22MP.AdvancedAPIs.GroupMessage23MP.AdvancedAPIs.TemplateMessage24MP.Entities25Open.Containers26Open.WxOpenAPIs.GetCategoryJson27TenPayV3.Apis28TenPayV3.Helpers29TenPayV3.TenPayHttpClient30Work.AdvancedAPIs.External.ExternalJson31Work.CommonAPIs32MP.AdvancedAPIs.Media33MP.AdvancedAPIs.NewTmpl34MP.CommonAPIs35MP.Containers36Open.WxOpenAPIs37Work.AdvancedAPIs38MP.AdvancedAPIs39Open.WxaAPIs4061026111620102111121119623522116211132163221143124152862841193162261712242221211171111311149113661151829441217561131711+284 more modules (most-connected shown)

At a glance — Code Health · 38% · Weak · gated by D18, R1, R7 ·

At a glance — Architecture · 98% · Exemplary ·

At a glance — Maturity · 65% · Adequate · gated by M2 ·

At a glance — Readiness · 43% · Weak · gated by D13, P3, P7 ·

At a glance — Security · 31% · Weak · gated by D28, D29, D30, D36, D44, S1 ·

At a glance — Accessibility · 50% · Adequate · gated by AC6 ·

At a glance — Performance · 60% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection487High / Critical
A07:2025 — Authentication Failures53High / Critical
A03:2025 — Software Supply Chain Failures31High / Critical
A01:2025 — Broken Access Control1Medium

Roadmap

First, replace all weak cryptographic hashes with secure alternatives like SHA-256 or non-cryptographic options depending on their specific use case. Next, remove hardcoded secrets from the codebase history and address the hundreds of missing or broken authorization checks identified by static analysis. Finally, upgrade the runtime environment to avoid end-of-life platforms and implement data erasure capabilities to comply with data subject rights.

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

Do thisHelpsEffortDimension
Resolve the 2 End-of-life runtime finding(s) in Platform End-of-Life — start with Senparc.Weixin.Cache.CsRedis.Tests.net8.csproj, Senparc.Weixin.NetCore3Sample.CommonService.csproj.+4.3 ptsLowPlatform End-of-Life
Resolve the 1 BlanketAnalyzerSeverityNone finding(s) in Explicit Debt — start with quality.globalconfig.+2.8 ptsLowExplicit Debt
Resolve the 7 EmptyCatchBlock finding(s) in Explicit Debt — start with CustomMessageHandler.cs (2), WeixinTrace.cs (2), REDACTED.+2.8 ptsLowExplicit Debt
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. This repository constructs a collision-broken hash (MD5/SHA1) at 7 sites, not one: `src/Senparc.Weixin.MP/Senparc.Weixin.MP/CheckSignature.cs:107` (SHA1), `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPayDownloadHelper.cs:133` (MD5), `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPayDownloadHelper.cs:135` (SHA1), `REDACTED:353` (SHA1CryptoServiceProvider), `REDACTED:355` (SHA1), `REDACTED:285` (SHA1CryptoServiceProvider), `REDACTED:287` (SHA1). Each is a separate decision — fixing only the line this row cites leaves the others in place.+5.4 ptsMediumCryptographic Hygiene
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED.+2.6 ptsLowREDACTED Scanning
Resolve the 49 REDACTED finding(s) in Secrets (history) — start with REDACTED (10), REDACTED (9), REDACTED (8).+4.7 ptsMediumSecrets (history)
Implement erasure ('right to be forgotten') over the data subject's records, tied to their subject/user id.+3.5 ptsMediumData-Subject Rights
Resolve the 19 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (19).+3.3 ptsMediumDependency Vulnerabilities

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.0SlopExplicit Debt: WriteOnlyPrivateField
REDACTED1.0SlopExplicit Debt: WriteOnlyPrivateField
REDACTED1.7SlopExplicit Debt: WriteOnlyPrivateField
Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs1.9SlopExplicit Debt: EmptyCatchBlock
REDACTED1.9SlopExplicit Debt: WriteOnlyPrivateField
REDACTED2.1SlopExplicit Debt: WriteOnlyPrivateField
src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/MessageHandlers/MessageHandlersTest.cs2.9SlopTest Quality: Assertions commented out: ContextTest
REDACTED3.4SlopExplicit Debt: WriteOnlyPrivateField
REDACTED3.5SlopExplicit Debt: EmptyCatchBlock
REDACTED3.5SlopExplicit Debt: WriteOnlyPrivateField
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

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

Critical — 168

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 — 2277

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 — 482

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

Could not be resolved — 6

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. 91 of 97 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 6 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 — 97 dimensions across the health lenses
D1D2D3D4D5D6D8D9D10D11D13D14D15D17D18D19D20D21D22D24D26D27D28D29D30D32D34D35D36D43D44AC2AC3AC6AC7AX1AX10AX2AX3AX5AX6AX8C1C2C5ED5GD1IC1M1M2M3M4P1P10P2P3P4P6P7PF1PF2PF3R1R10R2R3R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X32X4X5

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

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a16869-b17d-7670-ab63-c7261dc51e2f.

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

Run transparency — what happened this run

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

  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 1,135 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 3 test source file(s) (.js) 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.
  • D12 Dependency Hygiene — 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. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: error: The imported file "$(MSBuildExtensionsPath32)/Microsoft/VisualStudio/v$(VisualStudioVersion)/CodeSharing/Microsoft.CodeSharing.Common.Default.props" does not exist and appears to be part of a Visual Studio component. This file may require MSBuild.exe in order to be imported successfully, and ….
  • D14 License Compliance — 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. This repository declares package.json, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (167 contributor(s) across 11236 commit(s) sampled, automation and bot accounts excluded). One of them holds 86% of the history; the other 166 hold 0.1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D17 Explicit Debt — 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 C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net10.csproj' with message: System.Text.Encodings.Web 8.0.0 doesn't support netcoreapp3.1 and has not been tested with it. Consider upgrading your TargetFramework to net6.0 or later. You may also set <SuppressTfmSupportBuildWarnings>….
  • D18 Solution Shape — 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. A scan loads every live solution in the repository into one workspace. Every score, lens, and finding here reflects the projects of `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8.sln`, `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10.sln`, `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net6.sln`, `Samples/All/net45-mvc/Senparc.Weixin.MP.Sample.Net45.sln`, `Samples/All/console/Senparc.Weixin.MP.Sample.Consoles.NET10.sln`, `Samples/Work/Senparc.Weixin.Sample.Work.sln`, `Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2.sln`, `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen.sln`; 1 further solution(s) found in this tree (`src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net6.sln`) could not be added to it — their project list could not be read, or none of their projects opened — so their code is not represented in the headline. (This is a count of the solutions discovery found and could not show to be covered by the analyzed ones — not a claim about how many solution files the repository contains.) If one of them is an archived or vendored tree, declaring it — `.gitattributes` (`path/** linguist-vendored`) or `.editorconfig` (`[path/**] generated_code = true`) — excludes it from discovery the same way generated code is. You can widen what we reach: if one of these solutions is live code, check that it opens on its own (`dotnet build <solution>`); if it is archived or vendored, declare it so.
  • 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 (292,551 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"]`.
  • D30 Dependency Vulnerabilities — measured, with a gap in what it reached — 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 solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan. 2 of 3 declared ecosystem(s) (npm,osv) WERE scanned and every vulnerability they reported is included in this result; nuget was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that nuget is free of known-vulnerable dependencies.
  • D32 Data Compliance (PII/GDPR) — 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. `Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/ChatStore.cs`, `Samples/All/Senparc.Weixin.Sample.CommonService/EventService.cs`, `REDACTED`, `REDACTED`, `REDACTED`, … (+61 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.
  • D39 IL Efficiency — 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. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
  • AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: 4 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • 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. 572 further occurrence(s) are not listed individually; the score already reflects all 612.
  • X1 Async correctness — 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. 28 further occurrence(s) are not listed individually; the score already reflects all 68.
  • X2 Cancellation propagation — 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. 1488 further occurrence(s) are not listed individually; the score already reflects all 1528.
  • Package restore incomplete — third-party types were unresolved in part of the solution — NuGet restore did not complete for one or more projects, so those projects were analysed with framework references only: every check keyed on a third-party type saw an error type there and reported nothing. Findings on those projects are a lower bound; run `dotnet restore` on them and rescan.

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.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • 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.
  • D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • 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.
  • 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.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • 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.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (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.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • 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.
  • C5 Data-Subject Rights: This control is scored from in-repo evidence only — absence of evidence here means the scan found no in-repo trace, not that the control does not exist.
  • 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 (6): D19, D21, D22, D24, ED5, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.6 / 10Adequate✓ Tool-verified

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

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

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

21 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was DefaultWorkMessageContext.GetRequestEntityMappingResult at 74. A further 16 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 DefaultMpMessageContext.GetRequestEntityMappingResult at 67 — they are counted neither in the figure above nor in this dimension's score. 11 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: src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageContexts/DefaultMpMessageContext.cs (DefaultMpMessageContext.GetRequestEntityMappingResult at 67), src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/Async/MessageHandlerAsync.Event.cs (MessageHandler.OnEventRequestAsync at 59), src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.Event.cs (MessageHandler.OnEventRequest at 59), src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageContexts/DefaultWxOpenMessageContext.cs (DefaultWxOpenMessageContext.GetRequestEntityMappingResult at 36), src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.Event.cs (WxOpenMessageHandler.OnEventRequest at 34), and 6 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.

DefaultWorkMessageContext.GetRequestEntityMappingResult (cyclomatic 74)src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:76
WorkMessageHandler.OnEventRequestAsync (cyclomatic 68)src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:198
EntityHelper.FillEntityWithXml (cyclomatic 48)src/Senparc.Weixin.Work/Senparc.Weixin.Work/Helpers/EntityHelper.cs:96
CommonApi.GetButtonGroup (cyclomatic 41)src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs:91
RequestMessageFactory.GetRequestEntity (cyclomatic 30)src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs:59

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

What to do

  1. Bring the 4 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with DefaultWorkMessageContext.GetRequestEntityMappingResult (cyclomatic 74), WorkMessageHandler.OnEventRequestAsync (cyclomatic 68), EntityHelper.FillEntityWithXml (cyclomatic 48). — 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.6 to about 7.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity6.4 / 10Adequate✓ Tool-verified

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

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

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

31 method(s) exceeded the cognitive complexity threshold of 15; the worst was EntityHelper.FillEntityWithXml at 67.

CommonApi.GetMenuFromJson (cognitive 17) · ×2src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:117
SimulateToolController.Index (cognitive 16) · ×2REDACTED:344
EntityHelper.FillEntityWithXml (cognitive 67)src/Senparc.Weixin.Work/Senparc.Weixin.Work/Helpers/EntityHelper.cs:96
RedPackApi.SearchRedPack (cognitive 66)src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:544
CommonApi.GetButtonGroup (cognitive 61)src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs:91

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

What to do

  1. Bring the 31 bodies over 15 down to 15 or less in Cognitive Complexity — start with EntityHelper.FillEntityWithXml (cognitive 67), RedPackApi.SearchRedPack (cognitive 66), CommonApi.GetButtonGroup (cognitive 61). — 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 31 together lifts Cognitive Complexity from 6.4 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes9.0 / 10Stronggated by 67 serious findings✓ Tool-verified

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

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

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

67 god class(es) detected.

TooManyMethods: MeetingApi · ×38src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingApi.Layout.cs
MethodTooLong: WorkMessageHandler.OnEventRequestAsync · ×13src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:198
ClassTooLong: CardApi · ×8src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs
FileTooLong: Card/CardAPI.cs · ×8src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs

What to do

  1. Resolve the 38 TooManyMethods finding(s) in God Classes — start with MeetingApi.Layout.cs, WorkMessageHandler.cs, ExternalApi.cs. — One of this dimension's main actionable groups (38 warning-level).
  2. Resolve the 13 MethodTooLong finding(s) in God Classes — start with WxOpenMessageHandler.Event.cs (2), WorkMessageHandler.Async.cs, DefaultWorkMessageContext.cs. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 8 ClassTooLong finding(s) in God Classes — start with CardAPI.cs, ShakeAroundApi.cs, MassApi.cs. — One of this dimension's main actionable groups (8 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

688 duplicated block group(s) detected. A further 44 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 338 of the 732 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (5 lines × 2) · ×32src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:581
Duplicated block (6 lines × 2) · ×25src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1297
Duplicated block (13 lines × 2) · ×19src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1453
Members sharing a duplicated core (4 members, 50+ identical tokens) · ×18src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:179
Duplicated block (19 lines × 2) · ×18src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/ProductCoupon/ProductCouponModels.cs:35

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

What to do

  1. Resolve the 32 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with FaceApi.cs (4), MiniDramaApi.cs (4), WorkCustomMessageHandler.cs (4). — One of this dimension's main actionable groups (32 warning-level).
  2. Resolve the 25 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with TenPayV3.cs (10), RequestMessageFactory.cs (2), XPayApi.cs. — One of this dimension's main actionable groups (25 warning-level).
  3. Resolve the 19 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with CardAPI.cs (2), CustomMessageHandler.cs (2), CustomWxOpenMessageHandler.cs (2). — One of this dimension's main actionable groups (19 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling9.8 / 10Stronggated by 4 serious findings✓ Tool-verified

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

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

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

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

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

Off the main sequence: Senparc.Weixin.net10(net462) · ×4src/Senparc.Weixin/Senparc.Weixin/Senparc.Weixin.net10.csproj:1

What to do

  1. Resolve the 4 Off the main sequence finding(s) in Coupling — start with Senparc.Weixin.net10.csproj, Senparc.Weixin.net8.csproj, Senparc.Weixin.MP.net8.csproj. — One of this dimension's main actionable groups (4 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

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

2 of 79 classes have LCOM4 above 3.

Low cohesion: TenPayHttpClient (LCOM4 6) · ×2src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/TenPayHttpClient.cs:62

What to do

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

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

D8 · Code Coverage9.9 / 10Stronggated by 10 serious findings✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

Line coverage 77.2% — 1 file(s) below 50%.

Low coverage: src/Senparc.Weixin.MCP.Server/Tools/RandomNumberTools.cssrc/Senparc.Weixin.MCP.Server/Tools/RandomNumberTools.cs:1
No test project references Senparc.Weixin.MP.srcsrc/Senparc.Weixin.MP/Senparc.Weixin.MP/Senparc.Weixin.MP.src.csproj
No test project references Senparc.Weixin.WxOpen.Packagessrc/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.Packages.csproj
No test project references Senparc.Weixin.TenPaysrc/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay.csproj
No test project references Senparc.WebSocket.packagessrc/Senparc.WebSocket/src/Senparc.WebSocket/Senparc.WebSocket/Senparc.WebSocket.packages.csproj

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

What to do

  1. Resolve the 1 Low coverage finding(s) in Code Coverage — start with RandomNumberTools.cs. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 No test project references Senparc.Weixin.MP.src finding(s) in Code Coverage — start with Senparc.Weixin.MP.src.csproj. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 No test project references Senparc.Weixin.WxOpen.Packages finding(s) in Code Coverage — start with Senparc.Weixin.WxOpen.Packages.csproj. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Code Coverage in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

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

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

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

2226 test methods: 2226 unit, 0 integration, 0 BDD, 0 e2e.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.4 / 10Adequategated by 9 critical findings✓ Tool-verified

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

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

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

0 skipped, 35 zero-assertion, 12 whose failure is swallowed by a catch-all, 7 mock references across 1135 tests. Measured on the C# suite only — at least 3 test source file(s) (.js) went unread, so its test quality is unmeasured and is not in these counts.

Assertions commented out: ContextTest · ×5src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/MessageHandlers/MessageHandlersTest.cs:269
No assertions (empty test): GetAuthorizeUrlTest · ×4src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/OAuth/OAuthTest.cs:33
No assertions: CreateWxaQrCodeTest2 · ×19src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/WxApp/WxAppApiTests.cs:60
Test cannot fail: GetConversationRecordsTest · ×12src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/AdvancedAPIs/DataIntelligence/DataIntelligenceTest.cs:41
Mock framework: Moq · ×7

What to do

  1. Resolve the 5 Assertions commented out finding(s) in Test Quality — start with MessageHandlersTest.cs (3), CacheStrategyFactoryTests.cs, BaseContainerTests.cs. — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 4 No assertions (empty test) finding(s) in Test Quality — start with OAuthTest.cs, AccessTokenContainerLockTest.cs, TenPayTest.cs. — One of this dimension's main actionable groups (4 issue-level).
  3. Resolve the 19 No assertions finding(s) in Test Quality — start with WxAppApiTests.cs (2), SerializeTest.cs (2), WeixinRegisterTests.cs (2). — One of this dimension's main actionable groups (19 warning-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

0 flaky across 1 measured tier(s). unit: measured (0 flaky); other: not included — too large to re-run within its budget.

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

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

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

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

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

3 secret(s) detected.

REDACTED

What to do

  1. Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

0 of 671 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 74 direct `PackageReference`(s), and 192 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. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

Top hotspots: src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs (4×68=272); src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs (3×74=222); src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs (3×30=90)

Hotspot: src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs · ×3src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:198

What to do

  1. Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with WorkMessageHandler.Async.cs, DefaultWorkMessageContext.cs, RequestMessageFactory.cs. — One of this dimension's main actionable groups (3 warning-level).

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

D17 · Explicit Debt9.0 / 10Adequategated by 25 critical findings✓ Tool-verified

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

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

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

615 deducted debt markers + unmeasured dead symbols across 292551 LoC in the .NET projects (0.5/KLoC) → score 9.0. Dead code not measured: the solution did not load cleanly, so the reference search was skipped.

WriteOnlyPrivateField · ×17Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Controllers/CaseCollectionController.cs:13
EmptyCatchBlock · ×7Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:582
BlanketAnalyzerSeverityNoneeng/Quality/quality.globalconfig:5
CommentedOutCode · ×327Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:160
TodoComment · ×208Samples/All/Senparc.Weixin.Sample.CommonService/EventService.cs:163

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

What to do

  1. Resolve the 17 WriteOnlyPrivateField finding(s) in Explicit Debt — start with REDACTED (8), REDACTED (3), CaseCollectionController.cs (2). — One of this dimension's main actionable groups (17 issue-level).
  2. Resolve the 7 EmptyCatchBlock finding(s) in Explicit Debt — start with CustomMessageHandler.cs (2), WeixinTrace.cs (2), REDACTED. — One of this dimension's main actionable groups (7 issue-level).
  3. Resolve the 1 BlanketAnalyzerSeverityNone finding(s) in Explicit Debt — start with quality.globalconfig. — One of this dimension's main actionable groups (1 issue-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D18 · Solution Shape3.0 / 10Weak✓ Tool-verified

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

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

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

191 projects, 14723 source files, 332920 hand-written lines of code (292551 production / 40369 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), 312 inter-project edges (build failed). Measured across 8 solutions loaded as one workspace: `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8.sln`, `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10.sln`, `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net6.sln`, `Samples/All/net45-mvc/Senparc.Weixin.MP.Sample.Net45.sln`, `Samples/All/console/Senparc.Weixin.MP.Sample.Consoles.NET10.sln`, `Samples/Work/Senparc.Weixin.Sample.Work.sln`, `Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2.sln`, `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen.sln`.

Build failed
Solution references 5 projects that do not existsrc/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net6.sln
Duplicate project file: Senparc.Weixin.Cache.Redis.Testssrc/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis.Tests/Senparc.Weixin.Cache.Redis.Tests.csproj
Thin analysable surface across projects: Senparc.WebSocket.packagessrc/Senparc.WebSocket/src/Senparc.WebSocket/Senparc.WebSocket/Senparc.WebSocket.packages.csproj

What to do

  1. Resolve the 1 Build failed finding(s) in Solution Shape. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Solution references 5 projects that do not exist finding(s) in Solution Shape — start with Senparc.Weixin.WxOpen.net6.sln. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Duplicate project file finding(s) in Solution Shape — start with Senparc.Weixin.Cache.Redis.Tests.csproj. — One of this dimension's main actionable groups (1 recommendation-level).

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

D19 · Documentation QualityStrong◐ Sampled · advisory

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

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

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

The repository's root README is the project overview (Senparc.Weixin SDK) with links to all packages and a build status badge plus an extensive architecture/Docs markdown index covering Senparc.Weixin.Net10 through .NET Core samples. The Samples directory documents its own tier (AI-powered demos, All/net8-mvc console, MP, TenPayV2/V3, Work, WxOpen) with clear usage and a dedicated AI README. A separate docs/README.md covers installation, usage, and contribution for the docs repo, while src/readme.md points to source folders. The visible content is comprehensive but the summary reflects an overall high quality. The Senparc.Weixin project is well documented: a single README (docs/README.md) and an eng/README.md directory README describe the repository as a whole with overview, features, and a document catalogue; architecture/design docs are separately present at 106 markdown files. The XML-doc coverage figures show strong documentation for each NuGet package type (e.g. Senparc.Weixin.Net8Sample.CommonService at 37% is well covered). However the READMEs of the individual directories (ApiCompat, Quality, Tests) and the single repository README are all thin on installation/usage examples and missing the root-level overview/contribution guidance.

XML-doc coverage: Senparc.Weixin.Work.net10(net462) · ×65src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net10.csproj

What to do

  1. Improve Documentation Quality — currently 8.0/10. — The repository's root README is the project overview (Senparc.Weixin SDK) with links to all packages and a build status badge plus an extensive architecture/Docs markdown index covering Senparc.Weixin.Net10 through .NET Core samples. The Samples directory documents its own tier (AI-powered demos, All/net8-mvc console, MP, TenPayV2/V3, Work, WxOpen) with clear usage and a dedicated AI README. A separate docs/README.md covers installation, usage, and contribution for the docs repo, while src/readme.md points to source folders. The visible content is comprehensive but the summary reflects an overall high quality. The Senparc.Weixin project is well documented: a single README (docs/README.md) and an eng/README.md directory README describe the repository as a whole with overview, features, and a document catalogue; architecture/design docs are separately present at 106 markdown files. The XML-doc coverage figures show strong documentation for each NuGet package type (e.g. Senparc.Weixin.Net8Sample.CommonService at 37% is well covered). However the READMEs of the individual directories (ApiCompat, Quality, Tests) and the single repository README are all thin on installation/usage examples and missing the root-level overview/contribution guidance.

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

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

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

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

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

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

1 naming inconsistencies across 200 sampled symbols.

Inconsistent casing and naming for the TenPay V3 module components. Some types use 'TenPay.V3' (PascalCase V3), while others use 'TenPayV3' (camelCase V3). Additionally, one property name contains a typo ('ProfitShareing' instead of 'ProfitSharing').

✓ On the Gold path — maintain.

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

D22 · Internal API ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

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

0 API inconsistencies across 1 exposed types.

✓ On the Gold path — maintain.

Detailed fixes: d22_recommendation.md.

D24 · Comment ValueExemplary◐ Sampled · advisory

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

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

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

55 valuable / 1 redundant across 200 sampled comments; 1 shown with locations.

redundant commentSamples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:40

✓ On the Gold path — maintain.

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

D26 · Project Cohesion7.0 / 10Adequate✓ Tool-verified

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

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

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

14 of 91 projects flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

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

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

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

90 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: large — vertical-slice locality expected.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

488 finding(s): 0 critical, 6 high, 482 medium, 0 low. 6 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 106 file(s) — `Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/ChatStore.cs` (lines 24–25, line 151), `Samples/All/Senparc.Weixin.Sample.CommonService/EventService.cs` (line 136, line 137, line 138, …), `REDACTED` (lines 12–28, line 69), `REDACTED` (line 115, line 167), `REDACTED` (line 88), … (+101 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) — `Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/ChatStore.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. In 8 of those file(s) — `src/Senparc.WebSocket/src/Senparc.WebSocket/Senparc.WebSocket/Helpers/WebSocketHelper.cs`, `src/Senparc.Weixin.Open/Senparc.Weixin.Open.Test/WxaAPIs/Ams/AmsContractTests.cs`, `src/Senparc.Weixin.Open/Senparc.Weixin.Open.Test/WxaAPIs/CloudBaseBatch/CloudBaseBatchContractTests.cs`, `src/Senparc.Weixin.Open/Senparc.Weixin.Open.Test/WxaAPIs/CloudRun/CloudRunContractTests.cs`, `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/B2B/B2BContractTests.cs`, … (+3 more) — the break is at a TYPE DECLARATION (a C# primary constructor semgrep's grammar cannot parse), so the loss is wider than the named lines: rules scoped to that type see no type to scope to and are blind over its whole body, while rules matching statements keep working there. Absence of a type-scoped finding in those types is not evidence of anything.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 438 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (72), REDACTED (56), REDACTED (46). — One of this dimension's main actionable groups (438 warning-level).
  2. Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (8), REDACTED (3). — One of this dimension's main actionable groups (11 warning-level).
  3. No action in Static Analysis (SAST) — all 6 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 (6 issue-level, 0 of them charged here).

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

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

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

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

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

25 finding(s): 0 critical, 20 high, 4 medium, 1 low. Partial dependency scan: 2 of 3 declared ecosystem(s) were scanned (npm,osv), and the findings above are real and complete for them. nuget was not scanned (nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan), so this is not the whole dependency surface and the result is reported at reduced confidence.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 19 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (19). — One of this dimension's main actionable groups (19 issue-level).
  2. Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).

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

D32 · Data Compliance (PII/GDPR)9.0 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using Watchdog's own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

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

1 finding(s): 0 critical, 0 high, 1 medium, 0 low. semgrep could not parse 66 file(s) — `Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/ChatStore.cs`, `Samples/All/Senparc.Weixin.Sample.CommonService/EventService.cs`, `REDACTED`, `REDACTED`, `REDACTED`, … (+61 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D34 · Knowledge Freshness6.8 / 10Adequate✓ Tool-verified

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

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

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

314 of 1098 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs. Counted over 1098 of the 1906 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×40src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:1
Orphaned file · ×274src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Draft/DraftApi.cs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 274 Orphaned file finding(s) in Knowledge Freshness — start with MakeOutInvoiceData.cs (2), InvoiceData.cs (2), UploadImageReturnJson.cs (2). — One of this dimension's main actionable groups (274 recommendation-level).
  2. Resolve the 40 Orphaned knowledge finding(s) in Knowledge Freshness — start with ShakeAroundApi.cs, QueryBusifavorStockReturnJson.cs, InvoiceApi.cs. — One of this dimension's main actionable groups (40 issue-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

Strongest change-coupling: DefaultWorkMessageContext.cs↔WorkMessageHandler.cs 57%

Change coupling: DefaultWorkMessageContext.cs ↔ WorkMessageHandler.cssrc/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:1

What to do

  1. Resolve the 1 Change coupling finding(s) in Change Coupling — start with DefaultWorkMessageContext.cs. — One of this dimension's main actionable groups (1 warning-level).

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

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life2.0 / 10Critical✓ Tool-verified

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

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

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

2 end-of-life runtime(s) and 0 end-of-life framework(s), read from 85 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.

End-of-life runtime: .NET net6.0 · ×2src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis.Tests/Senparc.Weixin.Cache.CsRedis.Tests.net8.csproj:4

What to do

  1. Resolve the 2 End-of-life runtime finding(s) in Platform End-of-Life — start with Senparc.Weixin.Cache.CsRedis.Tests.net8.csproj, Senparc.Weixin.NetCore3Sample.CommonService.csproj. — One of this dimension's main actionable groups (2 warning-level).

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

Frontend & cross-cutting dimensions

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

AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC3 · Page structure5.2 / 10Adequate✓ Tool-verified

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

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

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

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×3) — tools/WeixinBrowserPlugin/src/demo-url-change-feature.html:2, tools/WeixinBrowserPlugin/src/popup.html:2, tools/WeixinBrowserPlugin/src/test.html:2
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — tools/WeixinBrowserPlugin/src/demo-url-change-feature.html:213

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC6 · Visual & motion safety3.5 / 10Weak✓ Tool-verified

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

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

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

  • `a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Content/Site.css:19, Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/Site.css:19
  • `.site-title a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Content/Site.css:143, Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/Site.css:143
  • `button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Content/reset.css:32, Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/reset.css:32
  • `.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×4) — Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Content/themes/base/jquery-ui.css:10, Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Content/themes/base/jquery.ui.core.css:15, Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/themes/base/jquery-ui.css:10, …
  • `.senparc-ai-logo-button` moves (`transition: background 0.3s, box-shadow 0.3s, transform 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tools/WeixinBrowserPlugin/src/styles.css:20
  • `html body.senparc-docked` moves (`transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tools/WeixinBrowserPlugin/src/styles.css:151
  • `.spinner` moves (`animation: spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tools/WeixinBrowserPlugin/src/styles.css:332
  • `.chat-hero::before` moves (`animation: float 20s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/chat-interface.css:21
  • `.chat-interface` moves (`animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/chat-interface.css:308
  • `.chat-feature` moves (`animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/chat-interface.css:323
  • `.loading-dot` moves (`animation: loadingBounce 1.4s infinite ease-in-out both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/chat-interface.css:365
  • `.response-item` moves (`animation: fadeInUp 0.6s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/chat-interface.css:391
  • `).animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×7) — Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Scripts/global.js:13, Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Scripts/global.js:19, Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Scripts/global.js:28, …
  • `helper).animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — REDACTED:3215
  • `toShow.animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — REDACTED:5907
  • `toHide.animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — REDACTED:5915

What to do

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

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no a11y linter (an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have) and no axe/pa11y/Lighthouse in tests or CI. Start by running that check over your rendered pages in CI. What was searched, so you can tell an absence from a miss: the 4 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
AX1 · Captive dependencies10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

AX10 · Code composition9.8 / 10Exemplary✓ Tool-verified

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

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.

AX2 · Stateful singletons10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

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

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

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

  • The namespaces Senparc.Weixin ↔ Senparc.Weixin.Entities ↔ Senparc.Weixin.Exceptions depend on each other. The lightest dependency in the cycle is Senparc.Weixin.Exceptions → Senparc.Weixin.Entities (Senparc.Weixin.Exceptions.ErrorJsonResultException → Senparc.Weixin.Entities.WxJsonResult, 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. — src/Senparc.Weixin/Senparc.Weixin/Exceptions/ErrorJsonResultException.cs:39
  • The namespaces Senparc.Weixin.Cache ↔ Senparc.Weixin.Containers depend on each other. The lightest dependency in the cycle is Senparc.Weixin.Containers → Senparc.Weixin.Cache (Senparc.Weixin.Containers.BaseContainer → Senparc.Weixin.Cache.IContainerCacheStrategy, 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. — src/Senparc.Weixin/Senparc.Weixin/Containers/BaseContainer.cs:77
  • The namespaces Senparc.Weixin.MP ↔ Senparc.Weixin.MP.AdvancedAPIs.AutoReply depend on each other. The lightest dependency in the cycle is Senparc.Weixin.MP → Senparc.Weixin.MP.AdvancedAPIs.AutoReply (Senparc.Weixin.MP.MenuFull_RootButton → Senparc.Weixin.MP.AdvancedAPIs.AutoReply.NewsInfo, 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. — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs:43
  • The namespaces Senparc.Weixin.Open ↔ Senparc.Weixin.Open.ComponentAPIs depend on each other. The lightest dependency in the cycle is Senparc.Weixin.Open → Senparc.Weixin.Open.ComponentAPIs (Senparc.Weixin.Open.Register → Senparc.Weixin.Open.ComponentAPIs.RefreshAuthorizerTokenResult, 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. — src/Senparc.Weixin.Open/Senparc.Weixin.Open/Register.cs:42
  • The namespaces Senparc.Weixin.TenPay ↔ Senparc.Weixin.TenPay.V3 depend on each other. The lightest dependency in the cycle is Senparc.Weixin.TenPay → Senparc.Weixin.TenPay.V3 (Senparc.Weixin.TenPay.Register → Senparc.Weixin.TenPay.V3.TenPayV3Info, 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. — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/Register.cs:26
  • The namespaces Senparc.Weixin.TenPayV3 ↔ Senparc.Weixin.TenPayV3.Apis.FundApp ↔ Senparc.Weixin.TenPayV3.Apis.Security depend on each other. The lightest dependency in the cycle is Senparc.Weixin.TenPayV3 → Senparc.Weixin.TenPayV3.Apis.Security (Senparc.Weixin.TenPayV3.SecurityEchoNotifyHandlerExtensions → Senparc.Weixin.TenPayV3.Apis.Security.SecurityEchoNotifyJson, 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. — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Security/SecurityEchoNotifyHandlerExtensions.cs:22
  • The namespaces Senparc.Weixin.Work ↔ Senparc.Weixin.Work.Entities depend on each other. The lightest dependency in the cycle is Senparc.Weixin.Work → Senparc.Weixin.Work.Entities (Senparc.Weixin.Work.RequestMessageFactory → Senparc.Weixin.Work.Entities.EncryptPostData, 3 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. — src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs:44

What to do

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

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

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

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

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

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

  • `ISenparcWeixinSettingForTenpayV3` declares 18 members: `TenPayV3_MchId`, `TenPayV3_SubMchId`, `TenPayV3_Key`, `TenPayV3_CertPath`, `TenPayV3_CertSecret`, `TenPayV3_AppId`, `TenPayV3_AppSecret`, `TenPayV3_SubAppId`, `TenPayV3_SubAppSecret`, `TenPayV3_TenpayNotify`, `TenPayV3_PrivateKey`, `TenPayV3_SerialNumber`, `TenPayV3_APIv3Key`, `TenPayV3_TenPayPubKey`, `TenPayV3_TenPayPubKeyID`, `TenPayV3_TenPayPubKeyEnable`, `TenPayV3_WxOpenTenpayNotify`, `EncryptionType`. 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. — src/Senparc.Weixin/Senparc.Weixin/Entities/SenparcWeixinSettings/SenparcWeixinSettingItem.Interfaces.cs:163

What to do

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

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

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

C1 · Data Protection6.5 / 10Adequate✓ 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.

What to do

  • Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.
C2 · Access Controls7.0 / 10Strong✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • Authorization IS enforced here (via [Authorize]/guards) — this is NOT a claim that endpoints are unprotected. What's missing is NAMED policies (AddAuthorization/AddPolicy, RequireRole/RequireClaim, RequireAuthorization): the access rules are implicit rather than named and testable. Recommendation, not a defect — name the rules so they're reviewable.

What to do

  • Add policy-based authorization — name the access rules (AddAuthorization(o => o.AddPolicy(…))) and apply them via [Authorize(Policy = …)] or RequireAuthorization.
C5 · Data-Subject Rights4.0 / 10Weak✓ Tool-verified

Other · Security — Whether GDPR data-subject requests are supported in code — erasure, export/portability, consent.

Method: Roslyn scan: GDPR data-subject-rights corroboration (erasure/export/consent vocabulary co-occurring with subject-id store crossing or explicit GDPR pattern). Deterministic, gated by PII.

  • Corroborated rights: erasure ✗ · export ✓ · consent ✗. Each tick means this scan found code in the repository implementing that right — a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A ✗ therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.

What to do

  • Implement erasure ('right to be forgotten') over the data subject's records, tied to their subject/user id.
  • Track GDPR consent (lawful basis) alongside the personal data it authorises.
ED5 · Idempotency10.0 / 10Exemplary◐ Sampled · advisory

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

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

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

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

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. (×3) — src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Memcached/ContainerCacheStrategy/MemcachedContainerCacheStrategy.cs:89, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundRequestHandler.cs:59, src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Dapr/ContainerCacheStrategy/DaprContainerCacheStrategy.cs:117

What to do

  • Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
IC1 · Incompleteness & stubs6.3 / 10Adequate✓ Tool-verified

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

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

  • `GetAll` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. (×2) — src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Dapr/ContainerCacheStrategy/DaprContainerCacheStrategy.cs:117, src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Memcached/ContainerCacheStrategy/MemcachedContainerCacheStrategy.cs:89
  • `OnEvent_ShakearoundUserShakeRequestAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/Async/MessageHandlerAsync.Event.cs:558
  • `ListAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Template/TemplateApi.cs:196
  • `DelAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Template/TemplateApi.cs:209
  • `SetParameter` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundRequestHandler.cs:59
  • A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×34) — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:19, Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:20, Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:24, …

What to do

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

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • 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 27 of 40 project(s) that lack one — worth up to 1.4 pts.
M2 · Architecture documentation3.0 / 10Weak✓ Tool-verified

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

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

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

What to do

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

Maturity · Maturity — Whether the 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.

M4 · Documentation accuracy9.6 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

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

  • readme.en.md names .NET 5, but the projects target .NET 3, 6, 8, 10. 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. — readme.en.md:611
  • docs/NET9_CERTIFICATE_COMPATIBILITY.md names .NET 9, but the projects target .NET 3, 6, 8, 10. 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. — docs/NET9_CERTIFICATE_COMPATIBILITY.md:212
  • src/readme.md links to `src/Senparc.WebSocket/`, but `src/src/Senparc.WebSocket` does not exist. 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. — src/readme.md:13
  • src/readme.md links to `src/Senparc.Weixin.Cache`, but `src/src/Senparc.Weixin.Cache` does not exist. 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. — src/readme.md:14
  • src/readme.md links to `src/Senparc.Weixin.AspNet`, but `src/src/Senparc.Weixin.AspNet` does not exist. 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. — src/readme.md:15
  • src/readme.md links to `src/Senparc.Weixin.MP.MvcExtension`, but `src/src/Senparc.Weixin.MP.MvcExtension` does not exist. 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. — src/readme.md:16
  • src/readme.md links to `src/Senparc.Weixin.MP`, but `src/src/Senparc.Weixin.MP` does not exist. 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. — src/readme.md:17
  • src/readme.md links to `src/Senparc.Weixin.MP.Middleware`, but `src/src/Senparc.Weixin.MP.Middleware` does not exist. 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. — src/readme.md:18
  • src/readme.md links to `src/Senparc.Weixin.Open`, but `src/src/Senparc.Weixin.Open` does not exist. 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. — src/readme.md:19
  • src/readme.md links to `src/Senparc.Weixin.TenPay`, but `src/src/Senparc.Weixin.TenPay` does not exist. 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. — src/readme.md:20
  • src/readme.md links to `src/Senparc.Weixin.Work`, but `src/src/Senparc.Weixin.Work` does not exist. 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. — src/readme.md:21
  • src/readme.md links to `src/Senparc.Weixin.Work.Middleware`, but `src/src/Senparc.Weixin.Work.Middleware` does not exist. 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. — src/readme.md:22
  • src/readme.md links to `src/Senparc.Weixin.WxOpen`, but `src/src/Senparc.Weixin.WxOpen` does not exist. 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. — src/readme.md:23
  • src/readme.md links to `src/Senparc.Weixin.WxOpen.Middleware`, but `src/src/Senparc.Weixin.WxOpen.Middleware` does not exist. 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. — src/readme.md:24
  • src/readme.md links to `src/Senparc.Weixin`, but `src/src/Senparc.Weixin` does not exist. 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. — src/readme.md:25
  • tools/WeixinDev/README.md changes into `WeiXinMPSDK/tools/WeixinDev`, but no such folder 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. — tools/WeixinDev/README.md:135
  • tools/WeixinDev/README.md links to `LICENSE`, but `tools/WeixinDev/LICENSE` does not exist. 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. — tools/WeixinDev/README.md:168
  • docs/en/guide/lib.md names .NET 5, but the projects target .NET 3, 6, 8, 10. 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. — docs/en/guide/lib.md:9
  • docs/zh/guide/lib.md names .NET 5, but the projects target .NET 3, 6, 8, 10. 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. — docs/zh/guide/lib.md:9
  • tools/WeixinBrowserPlugin/src/README.md links to `LICENSE`, but `tools/WeixinBrowserPlugin/src/LICENSE` does not exist. 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. — tools/WeixinBrowserPlugin/src/README.md:265

What to do

  • Reconcile the README with reality: readme.en.md names .NET 5, but the projects target .NET 3, 6, 8, 10; docs/NET9_CERTIFICATE_COMPATIBILITY.md names .NET 9, but the projects target .NET 3, 6, 8, 10; src/readme.md links to `src/Senparc.WebSocket/`, but `src/src/Senparc.WebSocket` does not exist; src/readme.md links to `src/Senparc.Weixin.Cache`, but `src/src/Senparc.Weixin.Cache` does not exist; src/readme.md links to `src/Senparc.Weixin.AspNet`, but `src/src/Senparc.Weixin.AspNet` does not exist.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

P10 · Library API & versioning6.0 / 10Adequate✓ Tool-verified

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

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

  • 169/203 types (83%) are public. For a library, every public type is a stability contract — make internal-by-default and expose only the intended API.

What to do

  • Make types internal by default; expose only the deliberate public API so internals can change without breaking consumers.
P2 · Observability5.1 / 10Adequate✓ Tool-verified

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

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

  • `REDACTED` reports through `Console.Write…` at line 174 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — REDACTED:174
  • `REDACTED` reports through `Console.Write…` at line 318 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — REDACTED:318
  • `REDACTED` reports through `Console.Write…` at line 319 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — REDACTED:319
  • `REDACTED` reports through `Console.Write…` at line 721 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — REDACTED:721
  • `REDACTED` reports through `Console.Write…` at line 747 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — REDACTED:747
  • `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs` reports through `Console.Write…` at line 170 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:170
  • `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs` reports through `Console.Write…` at line 258 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:258
  • `REDACTED` reports through `Console.Write…` at line 670 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. (×3) — REDACTED:670, REDACTED:670, REDACTED:670
  • `REDACTED` reports through `Console.Write…` at line 699 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. (×3) — REDACTED:699, REDACTED:699, REDACTED:699
  • `REDACTED` reports through `Console.Write…` at line 71 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — REDACTED:71
  • `REDACTED` reports through `Console.Write…` at line 190 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. (×2) — REDACTED:190, REDACTED:190
  • `REDACTED` reports through `Console.Write…` at line 349 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. (×2) — REDACTED:349, REDACTED:349
  • `REDACTED` reports through `Console.Write…` at line 350 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. (×2) — REDACTED:350, REDACTED:350
  • `REDACTED` reports through `Console.Write…` at line 689 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. (×2) — REDACTED:689, REDACTED:689
  • `REDACTED` reports through `Console.Write…` at line 715 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. (×2) — REDACTED:715, REDACTED:715
  • `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` reports through `Console.Write…` at line 156 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. (×2) — Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:156, Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:156
  • `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` reports through `Console.Write…` at line 244 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. (×2) — Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:244, Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:244

What to do

  • Replace `Console.Write…` in service code with the project's injected `ILogger<T>` (message templates with named properties), so delivery outcomes and failures reach the log pipeline with a level and a category.
  • Consider OpenTelemetry tracing/metrics and a health-check endpoint for operability.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 13936 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

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

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

  • The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

  • `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — REDACTED:101
  • `new HttpClient(handler)` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. (×2) — REDACTED:82, REDACTED:128
  • `services.AddHttpClient()` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Register.cs:56
  • `new HttpClient(new HttpClientHandler { UseCookies = false })` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:80
  • `services.AddHttpClient(certName)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — src/Senparc.Weixin/Senparc.Weixin/RegisterServices/SenparcWeixinRegisterServiceExtension.cs:236

What to do

  • Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging.
PF1 · Benchmark discipline6.0 / 10Adequate✓ Tool-verified

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

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

  • No benchmark suite was found by the two searches this check runs. FIRST, a BenchmarkDotNet package reference in any project file — every project the workspace loaded, plus a walk of project files on disk that never loaded, because a benchmark suite is exactly the project a partial load drops. SECOND, a script harness: a file whose name contains `benchmark` and ends `.py`, `.sh`, `.ps1`, `.bash`, `.rb`, `.js` or `.mjs`, credited ONLY when this repository's CI text also mentions benchmarks — a harness no pipeline runs is read as a fixture, deliberately. Neither search can see a benchmark suite in another ecosystem's idiom (a Go `testing.B` file, a JMH or criterion project, a pytest-benchmark run), so this is 'no benchmark found by those two searches', not a verdict that the repository has none. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.

What to do

  • Add a benchmarking harness for the hot paths and run it in CI to catch regressions (for .NET, a BenchmarkDotNet project with [MemoryDiagnoser] to track allocations).
PF2 · Allocation hygiene6.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Raise allocation-aware density on the hot paths — currently 7 use(s) across 297,024 production line(s) (~0.0/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

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

  • 23 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).
  • `.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). (×20) — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/AccessTokenContainer.cs:222, src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/JsApiTicketContainer.cs:154, src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/ProviderTokenContainer.cs:150, …
  • `.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). (×2) — src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:346, src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:357
  • `.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). — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:345

What to do

  • Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
R1 · Type Safety1.4 / 10Critical✓ Tool-verified

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

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

  • 4 typed · 24 plain JS — the untyped files are src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/app.js, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/LivePusher/LivePusher.js, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/Login/Login.js, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/QrCode/QrCode.js, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/logs/logs.js (+18 more).

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.8 / 10Strong✓ Tool-verified

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

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

  • Samples/WxOpen/Senparc.Weixin.WxOpen.AppDemo/ and src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/ are near-verbatim copies of each other: 36 files are byte-identical under the same relative paths (~9924 lines; the trees hold 43 and 70 files). That is one structural fact, not 36 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/utils/signalr.test.js:1
  • src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:2 · src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js:2 — these 2 files are line-for-line copies of one another — 392 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:2
  • src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/components/create/createstep.js:3 · src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/components/create/createstep.js:3 — these 2 files are line-for-line copies of one another — 201 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/components/create/createstep.js:3
  • src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/stores/projectStores.js:3 · src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/stroes/projectStores.js:3 — these 2 files are line-for-line copies of one another — 101 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/stores/projectStores.js:3
  • src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/websocket/websocket.js:3 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/websocket_signalr/websocket_signalr.js:4 — the two spans are one implementation copied and then locally edited — 204 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/websocket/websocket.js:3
  • src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:6 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/login-status-card/index.js:6 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/send-result-card/index.js:7 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:6
  • src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/utils/senparc.websocket.1.0.js:4 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/utils/senparc.websocket.2.0.js:4 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/utils/senparc.websocket.1.0.js:4
  • src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js:136 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js:172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js:136
  • src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:6 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/login-status-card/index.js:6 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/message-list-card/index.js:8 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/send-result-card/index.js:7 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:6
  • src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/Login/Login.js:20 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js:389 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/Login/Login.js:20
  • tools/WeixinDev/src/interfaceInserter.ts:33 · tools/WeixinDev/src/sidebarProvider.ts:60 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — tools/WeixinDev/src/interfaceInserter.ts:33
  • src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:41 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/send-result-card/index.js:34 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:41

What to do

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

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

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

  • s has cyclomatic complexity 18 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:88, src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js:88
  • a has cyclomatic complexity 17 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:36, src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js:36
  • (anonymous) has cyclomatic complexity 15 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tools/WeixinDev/src/extension.ts:44
  • on has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:457, src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js:457
  • (anonymous) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:434, src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js:434

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files8.6 / 10Strong✓ Tool-verified

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

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

  • src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js has 407 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R5 · Dependency Freshness9.8 / 10Exemplary✓ Tool-verified

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

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

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

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

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

R7 · Dead Code0.0 / 10Critical✓ Tool-verified

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

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

  • Unreachable from the 14 application, 1 tooling and 0 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (14 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×9) — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js, src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js, tools/WeixinDev/src/sidebarProvider.ts, …
  • no import path from any entry point (14 application, 1 tooling, 0 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (tools/WeixinDev/src/interfaceInserter.ts, tools/WeixinDev/src/sidebarProvider.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — tools/WeixinDev/src/apiService.ts
  • no import path from any entry point (14 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (tools/WeixinDev/src/sidebarProvider.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — tools/WeixinDev/src/interfaceInserter.ts
  • tools/WeixinDev/package.json contributes this command, so VS Code offers it in the palette and in every menu or keybinding that cites it — but no source file calls registerCommand with this id, and the id occurs in no source string at all; invoking it fails with "command 'weixindev.openSidebar' not found". The source does register 1 command(s) by literal ('weixindev.insertWeixinInterface'), which is what makes the absence provable. Register it at activation, or delete the contribution together with the menu and keybinding entries that reference it. — tools/WeixinDev/package.json
  • tools/WeixinDev/package.json contributes this command, so VS Code offers it in the palette and in every menu or keybinding that cites it — but no source file calls registerCommand with this id, and the id occurs in no source string at all; invoking it fails with "command 'weixindev.refreshWebview' not found". The source does register 1 command(s) by literal ('weixindev.insertWeixinInterface'), which is what makes the absence provable. Register it at activation, or delete the contribution together with the menu and keybinding entries that reference it. — tools/WeixinDev/package.json
  • tools/WeixinDev/out/extension-backup.js.map sits in 'tools/WeixinDev/out', which tools/WeixinDev/tsconfig.json declares as this project's outDir, so it is committed compiler output; the map itself records that it was generated from 'tools/WeixinDev/src/extension-backup.ts', and no such file exists in the repository — its emitted file is already gone, only the map was left behind. 4 other map(s) in the same directory resolve to sources that do exist, which is what makes the absence provable rather than a path-resolution gap. Delete the orphaned artefact(s), or stop committing the output directory and let the build produce it. — tools/WeixinDev/out/extension-backup.js.map
  • tools/WeixinDev/out/extension-complex.js.map sits in 'tools/WeixinDev/out', which tools/WeixinDev/tsconfig.json declares as this project's outDir, so it is committed compiler output; the map itself records that it was generated from 'tools/WeixinDev/src/extension-complex.ts', and no such file exists in the repository — its emitted file is already gone, only the map was left behind. 4 other map(s) in the same directory resolve to sources that do exist, which is what makes the absence provable rather than a path-resolution gap. Delete the orphaned artefact(s), or stop committing the output directory and let the build produce it. — tools/WeixinDev/out/extension-complex.js.map
  • tools/WeixinDev/out/extension-minimal.js.map sits in 'tools/WeixinDev/out', which tools/WeixinDev/tsconfig.json declares as this project's outDir, so it is committed compiler output; the map itself records that it was generated from 'tools/WeixinDev/src/extension-minimal.ts', and no such file exists in the repository — its emitted file is already gone, only the map was left behind. 4 other map(s) in the same directory resolve to sources that do exist, which is what makes the absence provable rather than a path-resolution gap. Delete the orphaned artefact(s), or stop committing the output directory and let the build produce it. — tools/WeixinDev/out/extension-minimal.js.map
  • tools/WeixinDev/out/extension-simple.js.map sits in 'tools/WeixinDev/out', which tools/WeixinDev/tsconfig.json declares as this project's outDir, so it is committed compiler output; the map itself records that it was generated from 'tools/WeixinDev/src/extension-simple.ts', and no such file exists in the repository — its emitted file is already gone, only the map was left behind. 4 other map(s) in the same directory resolve to sources that do exist, which is what makes the absence provable rather than a path-resolution gap. Delete the orphaned artefact(s), or stop committing the output directory and let the build produce it. — tools/WeixinDev/out/extension-simple.js.map

What to do

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

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

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

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

What to do

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

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

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

S1 · Cryptographic Hygiene0.0 / 10Critical✓ Tool-verified

Other · Security — Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored.

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.

  • 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. (×7) — REDACTED:353, src/Senparc.Weixin.MP/Senparc.Weixin.MP/CheckSignature.cs:107, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPayDownloadHelper.cs:133, …
  • A digest from `GenarateSinature` (MD5/SHA1) is compared against an expected value here, and a mismatch rejects the input — so a collision-broken hash IS the integrity check. — src/Senparc.Weixin.Work.Middleware/MessageHandlers/Middleware/WorkMessageHandlerMiddleware.cs:115
  • `password` is the private-key passphrase and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. (×8) — REDACTED:891, REDACTED:940, REDACTED:844, …
  • DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes. (×7) — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:126, src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:158, src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:233, …

What to do

  • 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. This repository constructs a collision-broken hash (MD5/SHA1) at 7 sites, not one: `src/Senparc.Weixin.MP/Senparc.Weixin.MP/CheckSignature.cs:107` (SHA1), `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPayDownloadHelper.cs:133` (MD5), `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPayDownloadHelper.cs:135` (SHA1), `REDACTED:353` (SHA1CryptoServiceProvider), `REDACTED:355` (SHA1), `REDACTED:285` (SHA1CryptoServiceProvider), `REDACTED:287` (SHA1). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Verify integrity with SHA-256+ rather than MD5/SHA1: a collision-broken digest cannot establish that content matches what was expected, since an attacker able to influence the content can produce a colliding replacement. Where the content is downloaded or otherwise attacker-reachable, prefer an authenticated check — a signature over the digest, or the publisher's SHA-256 fetched over a channel the content itself does not come from. The gate is at `src/Senparc.Weixin.Work.Middleware/MessageHandlers/Middleware/WorkMessageHandlerMiddleware.cs:115`.
  • Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations. This repository constructs key or salt material fixed at compile time at 8 sites, not one: `REDACTED:891` (private-key passphrase, `password`), `REDACTED:940` (private-key passphrase, `password`), `REDACTED:844` (private-key passphrase, `password`), `REDACTED:893` (private-key passphrase, `password`), `REDACTED:891` (private-key passphrase, `password`), `REDACTED:940` (private-key passphrase, `password`), `REDACTED:895` (private-key passphrase, `password`), `REDACTED:944` (private-key passphrase, `password`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Replace DES/3DES (and bare RijndaelManaged) with AES-GCM via `Aes.Create()`. This repository constructs a broken or deprecated cipher at 7 sites, not one: `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:126` (RijndaelManaged), `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:158` (RijndaelManaged), `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:233` (RijndaelManaged), `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:132` (RijndaelManaged), `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:146` (RijndaelManaged), `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:178` (RijndaelManaged), `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:253` (RijndaelManaged). Each is a separate decision — fixing only the line this row cites leaves the others in place.
X1 · Async correctness7.0 / 10Adequate✓ Tool-verified

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

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

  • `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin. (×19) — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/SmartRobot/SmartRobotWebSocketClient.cs:111, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1070, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1091, …
  • 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. (×17) — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/AccessTokenContainer.cs:222, src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/JsApiTicketContainer.cs:154, src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/ProviderTokenContainer.cs:150, …
  • `Thread.Sleep` parks the thread for the whole delay: no other work runs on it, and under load the pool must grow to make up for it. `await Task.Delay(…)` suspends only this method. — REDACTED:315
  • `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead. — REDACTED:413
  • Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout. (×2) — REDACTED:88, REDACTED:122

What to do

  • Blocking `MemoryStream.Write` inside an `async` method
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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

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

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

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

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

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

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

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

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

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

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

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

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

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

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

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

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

X18 · Disposal-pattern correctness5.4 / 10Adequate✓ Tool-verified

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

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

  • `sha1` is a `SHA1`, which implements `IDisposable`, and it is created here (line 107). Every use of it in `GetSignature` 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 sha1 = …;`), which releases it at the end of the scope on every path including a throw. — src/Senparc.Weixin.MP/Senparc.Weixin.MP/CheckSignature.cs:107
  • `aes` is a `RijndaelManaged`, which implements `IDisposable`, and it is created here (line 132). Every use of it in `AES_Decrypt` 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 aes = …;`), which releases it at the end of the scope on every path including a throw. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:132
  • `cs` is a `CryptoStream`, which implements `IDisposable`, and it is created here (line 184). Every use of it in `AES_Decrypt` 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 cs = …;`), which releases it at the end of the scope on every path including a throw. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:184
  • `fs` is a `FileStream`, which implements `IDisposable`, and it is created here (line 139). Every use of it in `Download` 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 fs = …;`), which releases it at the end of the scope on every path including a throw. (×2) — REDACTED:139, REDACTED:139
  • `bitmap` is a `Bitmap`, which implements `IDisposable`, and it is created here (line 102). Every use of it in `Index` 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 bitmap = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:102
  • `bitmap` is a `Bitmap`, which implements `IDisposable`, and it is created here (line 264). Every use of it in `Native` 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 bitmap = …;`), which releases it at the end of the scope on every path including a throw. (×2) — REDACTED:264, REDACTED:264
  • `fileStream` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 266). Every use of it in `Native` 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 fileStream = …;`), which releases it at the end of the scope on every path including a throw. (×2) — REDACTED:266, REDACTED:266
  • `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 910). Every use of it in `SendGroupRedPack` 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 streamReader = …;`), which releases it at the end of the scope on every path including a throw. (×2) — REDACTED:910, REDACTED:910
  • `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 958). Every use of it in `GetHBInfo` 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 streamReader = …;`), which releases it at the end of the scope on every path including a throw. (×2) — REDACTED:958, REDACTED:958
  • `bitmap` is a `Bitmap`, which implements `IDisposable`, and it is created here (line 1022). Every use of it in `ProductPayCode` 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 bitmap = …;`), which releases it at the end of the scope on every path including a throw. (×2) — REDACTED:1022, REDACTED:1022
  • `fileStream` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 347). Every use of it in `Native` 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 fileStream = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:347
  • `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 914). Every use of it in `SendGroupRedPack` 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 streamReader = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:914
  • `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 962). Every use of it in `GetHBInfo` 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 streamReader = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:962
  • `httpClient` is a `HttpClient`, which implements `IDisposable`, and it is created here (line 101). Every use of it in `ProcessQuery` 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 httpClient = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:101
  • `bitmap` is a `Bitmap`, which implements `IDisposable`, and it is created here (line 84). Every use of it in `Index` 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 bitmap = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:84
  • `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 863). Every use of it in `SendGroupRedPack` 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 streamReader = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:863
  • `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 911). Every use of it in `GetHBInfo` 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 streamReader = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:911

What to do

  • Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

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

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

X2 · Cancellation propagation4.2 / 10Weak✓ Tool-verified

Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).

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

  • Only 67/1590 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. (×39) — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/App/AppApi.cs:127, src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/App/AppApi.cs:146, src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/App/AppApi.cs:167, …

What to do

  • Thread a CancellationToken through async methods so work stops promptly on cancellation.
X20 · Mistyped argument guard6.2 / 10Adequate✓ Tool-verified

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

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

  • The guard on line 1279 rejects `appKey` and line 1281 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(appKey)` is true of a value that is NOT null: it is satisfied by an EMPTY `appKey`, and on that path `appKey` 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. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1281
  • The guard on line 1283 rejects `uri` and line 1285 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(uri)` is true of a value that is NOT null: it is satisfied by an EMPTY `uri`, and on that path `uri` 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. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1285
  • The guard on line 1314 rejects `sessionKey` and line 1316 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(sessionKey)` is true of a value that is NOT null: it is satisfied by an EMPTY `sessionKey`, and on that path `sessionKey` 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. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1316

What to do

  • Each finding names the throw and the test in its own condition that is true of a NON-null value. Confirm from the two, then throw the exception that describes what was actually wrong: `ArgumentException` for a value that arrived empty, or the .NET 8 helpers that spell the whole guard in one line and pick the type for you — `ArgumentException.ThrowIfNullOrEmpty(s)` / `ThrowIfNullOrWhiteSpace(s)` for strings, `ArgumentNullException.ThrowIfNull(x)` followed by `ArgumentOutOfRangeException.ThrowIfZero(x.Count)` for a collection. Splitting the two conditions is usually clearer than picking one exception for both: they are different failures and the caller may want to handle them differently.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

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

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

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.

X24 · Document value interpolated into markup unescaped1.6 / 10Critical✓ Tool-verified

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

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

  • `sb.ToString()` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×5) — REDACTED:110, REDACTED:269, REDACTED:108, …
  • `"用户已授权,授权Token:" + result` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×3) — REDACTED:197, REDACTED:197, REDACTED:146
  • `string.Format("<a href=\"{0}\">点击这里</a>。", Url.Action("Index"))` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — REDACTED:219, REDACTED:219
  • `msg` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — REDACTED:221, REDACTED:221
  • `t` is text this program did not author, and it is written into a script or style context through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. (×3) — REDACTED:599, REDACTED:599, REDACTED:512

What to do

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

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

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

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

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

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

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

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

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

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

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

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

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

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

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

X3 · Exception handling7.0 / 10Adequate✓ Tool-verified

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

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

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×7) — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MsgAudit/MsgAuditFinanceClient.cs:360, src/Senparc.Weixin/Senparc.Weixin/Trace/WeixinTrace.cs:151, src/Senparc.Weixin/Senparc.Weixin/Trace/WeixinTrace.cs:183, …
  • `catch (Exception)` 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. (×3) — src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:170, src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs:214, Samples/All/Senparc.Weixin.Sample.CommonService/TemplateMessage/WeixinTemplate_ExceptionAlert.cs:84
  • `catch (WeixinException)` 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. — src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:208
  • `catch (System.Exception)` 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. — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Result/TenPayV3Results.cs:189
  • `catch (UnauthorizedAccessException)` 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. — tools/Senparc.Weixin.CLI/WorkspaceServices.cs:215
  • `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. — tools/Senparc.Weixin.CLI/WorkspaceServices.cs:345

What to do

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

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

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

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.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

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

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

X5 · Nullable reference types6.8 / 10Adequate✓ Tool-verified

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

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

  • This method contradicts itself about `fullButton`: line 140 assigns it with `as Dictionary<string, object>`, which hands back null rather than throwing when the value is not a `Dictionary<string, object>`, but line 141 then dereferences it directly as `fullButton.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 `fullButton` once before the first use and handle the null case, or cast with `(Dictionary<string, object>)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:141
  • This method contradicts itself about `strongRequestMessage`: line 200 assigns it with `as IRequestMessageEventBase`, which hands back null rather than throwing when the value is not a `IRequestMessageEventBase`, but line 203 then dereferences it directly as `strongRequestMessage.Event` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEventBase)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:203
  • This method contradicts itself about `ccRequestMessage`: line 264 assigns it with `as IRequestMessageEvent_Change_Contact_Base`, which hands back null rather than throwing when the value is not a `IRequestMessageEvent_Change_Contact_Base`, but line 266 then dereferences it directly as `ccRequestMessage.ChangeType` 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 `ccRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEvent_Change_Contact_Base)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:266
  • This method contradicts itself about `cecRequestMessage`: line 310 assigns it with `as IRequestMessageEvent_Change_ExternalContact_Base`, which hands back null rather than throwing when the value is not a `IRequestMessageEvent_Change_ExternalContact_Base`, but line 312 then dereferences it directly as `cecRequestMessage.ChangeType` 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 `cecRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEvent_Change_ExternalContact_Base)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:312
  • This method contradicts itself about `cechat`: line 353 assigns it with `as RequestMessageEvent_Change_External_Chat_Base`, which hands back null rather than throwing when the value is not a `RequestMessageEvent_Change_External_Chat_Base`, but line 355 then dereferences it directly as `cechat.ChangeType` 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 `cechat` once before the first use and handle the null case, or cast with `(RequestMessageEvent_Change_External_Chat_Base)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:355
  • This method contradicts itself about `tag`: line 379 assigns it with `as RequestMessageEvent_Change_External_Tag_Base`, which hands back null rather than throwing when the value is not a `RequestMessageEvent_Change_External_Tag_Base`, but line 381 then dereferences it directly as `tag.ChangeType` 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 `tag` once before the first use and handle the null case, or cast with `(RequestMessageEvent_Change_External_Tag_Base)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:381
  • This method contradicts itself about `cecRequestMessage`: line 1238 assigns it with `as IRequestMessageEvent_Change_ExternalContact_Base`, which hands back null rather than throwing when the value is not a `IRequestMessageEvent_Change_ExternalContact_Base`, but line 1240 then dereferences it directly as `cecRequestMessage.ChangeType` 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 `cecRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEvent_Change_ExternalContact_Base)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:1240
  • This method contradicts itself about `sLeft`: line 299 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 301 then dereferences it directly as `sLeft.Length` 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 `sLeft` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:301
  • This method contradicts itself about `sRight`: line 300 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 302 then dereferences it directly as `sRight.Length` 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 `sRight` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:302
  • This method contradicts itself about `sLeft`: line 231 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 233 then dereferences it directly as `sLeft.Length` 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 `sLeft` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:233
  • This method contradicts itself about `sRight`: line 232 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 234 then dereferences it directly as `sRight.Length` 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 `sRight` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:234
  • This method contradicts itself about `fullButton`: line 184 assigns it with `as Dictionary<string, object>`, which hands back null rather than throwing when the value is not a `Dictionary<string, object>`, but line 185 then dereferences it directly as `fullButton.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 `fullButton` once before the first use and handle the null case, or cast with `(Dictionary<string, object>)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs:185
  • This method contradicts itself about `strongRequestMessage`: line 52 assigns it with `as IRequestMessageEventBase`, which hands back null rather than throwing when the value is not a `IRequestMessageEventBase`, but line 56 then dereferences it directly as `strongRequestMessage.Event` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEventBase)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/Async/MessageHandlerAsync.Event.cs:56
  • This method contradicts itself about `strongRequestMessage`: line 54 assigns it with `as IRequestMessageEventBase`, which hands back null rather than throwing when the value is not a `IRequestMessageEventBase`, but line 58 then dereferences it directly as `strongRequestMessage.Event` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEventBase)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.Event.cs:58
  • This method contradicts itself about `strongRequestMessage`: line 83 assigns it with `as IRequestMessageEventBase`, which hands back null rather than throwing when the value is not a `IRequestMessageEventBase`, but line 85 then dereferences it directly as `strongRequestMessage.Event` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEventBase)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.Event.cs:85
  • This method contradicts itself about `strongRequestMessage`: line 501 assigns it with `as IRequestMessageEventBase`, which hands back null rather than throwing when the value is not a `IRequestMessageEventBase`, but line 503 then dereferences it directly as `strongRequestMessage.Event` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEventBase)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.Event.cs:503
  • This method contradicts itself about `baseCacheStrategy`: line 135 assigns it with `as RedisHashSetObjectCacheStrategy`, which hands back null rather than throwing when the value is not a `RedisHashSetObjectCacheStrategy`, but line 138 then dereferences it directly as `baseCacheStrategy.GetFinalKey` 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 `baseCacheStrategy` once before the first use and handle the null case, or cast with `(RedisHashSetObjectCacheStrategy)` so the failure is reported where it happens — rather than leaving the two readings side by side. (×2) — src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:138, src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:138
  • This method contradicts itself about `baseCacheStrategy`: line 164 assigns it with `as RedisHashSetObjectCacheStrategy`, which hands back null rather than throwing when the value is not a `RedisHashSetObjectCacheStrategy`, but line 167 then dereferences it directly as `baseCacheStrategy.GetFinalKey` 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 `baseCacheStrategy` once before the first use and handle the null case, or cast with `(RedisHashSetObjectCacheStrategy)` so the failure is reported where it happens — rather than leaving the two readings side by side. (×2) — src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:167, src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:167
  • This method contradicts itself about `openId`: line 47 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 49 then dereferences it directly as `openId.IsNullOrEmpty` 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 `openId` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side. (×2) — REDACTED:49, REDACTED:49
  • This method contradicts itself about `addConditionalButtonGroup`: line 131 assigns it with `as ConditionalButtonGroup`, which hands back null rather than throwing when the value is not a `ConditionalButtonGroup`, but line 132 then dereferences it directly as `addConditionalButtonGroup.matchrule` 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 `addConditionalButtonGroup` once before the first use and handle the null case, or cast with `(ConditionalButtonGroup)` so the failure is reported where it happens — rather than leaving the two readings side by side. (×2) — REDACTED:132, REDACTED:132
  • This method contradicts itself about `strongRequestMessage`: line 69 assigns it with `as RequestMessageText`, which hands back null rather than throwing when the value is not a `RequestMessageText`, but line 75 then dereferences it directly as `strongRequestMessage.Content` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(RequestMessageText)` so the failure is reported where it happens — rather than leaving the two readings side by side. (×2) — REDACTED:75, REDACTED:75
  • This method contradicts itself about `strongRequestMessage`: line 87 assigns it with `as RequestMessageImage`, which hands back null rather than throwing when the value is not a `RequestMessageImage`, but line 94 then dereferences it directly as `strongRequestMessage.PicUrl` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(RequestMessageImage)` so the failure is reported where it happens — rather than leaving the two readings side by side. (×2) — REDACTED:94, REDACTED:94
  • This method contradicts itself about `workSetting`: line 174 assigns it with `as ISenparcWeixinSettingForWork`, which hands back null rather than throwing when the value is not a `ISenparcWeixinSettingForWork`, but line 178 then dereferences it directly as `workSetting.WeixinCorpId` 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 `workSetting` once before the first use and handle the null case, or cast with `(ISenparcWeixinSettingForWork)` so the failure is reported where it happens — rather than leaving the two readings side by side. (×2) — REDACTED:178, REDACTED:178
  • This method contradicts itself about `data`: line 449 writes `data?.sp_mchid`, which says `data` can be null, but line 449 then dereferences it directly as `data.order_no` 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. — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:449
  • This method contradicts itself about `data`: line 472 writes `data?.sp_mchid`, which says `data` can be null, but line 472 then dereferences it directly as `data.order_no` 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. — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:472
  • This method contradicts itself about `data`: line 544 writes `data?.sp_mchid`, which says `data` can be null, but line 544 then dereferences it directly as `data.out_trade_no` 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. — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:544
  • This method contradicts itself about `certificate`: line 227 writes `certificate?.ResultCode`, which says `certificate` can be null, but line 230 then dereferences it directly as `certificate.data` 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 `certificate` truly cannot be null here, the `?.` is misleading. Settle it one way — test `certificate` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — REDACTED:230
  • This method contradicts itself about `workSetting`: line 35 assigns it with `as ISenparcWeixinSettingForWork`, which hands back null rather than throwing when the value is not a `ISenparcWeixinSettingForWork`, but line 43 then dereferences it directly as `workSetting.WeixinCorpId` 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 `workSetting` once before the first use and handle the null case, or cast with `(ISenparcWeixinSettingForWork)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:43
  • This method contradicts itself about `openId`: line 54 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 56 then dereferences it directly as `openId.IsNullOrEmpty` 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 `openId` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:56
  • This method contradicts itself about `strongRequestMessage`: line 67 assigns it with `as RequestMessageText`, which hands back null rather than throwing when the value is not a `RequestMessageText`, but line 73 then dereferences it directly as `strongRequestMessage.Content` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(RequestMessageText)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:73
  • This method contradicts itself about `strongRequestMessage`: line 85 assigns it with `as RequestMessageImage`, which hands back null rather than throwing when the value is not a `RequestMessageImage`, but line 92 then dereferences it directly as `strongRequestMessage.PicUrl` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(RequestMessageImage)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:92
  • This method contradicts itself about `addConditionalButtonGroup`: line 129 assigns it with `as ConditionalButtonGroup`, which hands back null rather than throwing when the value is not a `ConditionalButtonGroup`, but line 130 then dereferences it directly as `addConditionalButtonGroup.matchrule` 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 `addConditionalButtonGroup` once before the first use and handle the null case, or cast with `(ConditionalButtonGroup)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:130
  • 21/35 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.

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

WCAG coverage — what static analysis assessed

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

DimensionWCAG 2.2 A/AA criteriaCoverage
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

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

Reference — by lens

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

LensScoreRatingImpact
Code Health38%Weak — gated by D18, R1, R7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture98%ExemplaryStrongest area.
Maturity65%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness43%Weak — gated by D13, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security31%Weak — gated by D28, D29, D30, D36, D44, S1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility50%Adequate — gated by AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 4 check(s) recorded observations but carry no score

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

  • 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.
  • X6 Hand-rolled structured-format parsing — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 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.
  • C4 Data Retention — Repo shows no data-retention / TTL / cleanup mechanism for personal data — absence of evidence is not evidence of a working control. Define retention periods and a purge/cleanup job (or TTL) in code, or document where retention is enforced, so this dimension can be scored.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 28 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 image/media element found in the parsed markup — AC1 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • 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
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • D12 Dependency Hygiene — Dependency hygiene not measured
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • 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
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • 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.
  • D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (a Domain/Aggregates/ValueObjects layer)
  • ED1 Event-Driven — applicable but not scored (2 of 3 signals for this style — below the bar we score at): a message-bus package; 43 CQRS handler(s)
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — 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.
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — coverage data present for 3 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R4 Test Coverage — the JS/TS workspace (34 production file(s)) has no JavaScript/TypeScript test, but it is 13.31% of this repository's production source and the other 86.69% carries 41,223 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 168 finding(s)
D28 · Secrets (history) · REDACTED · ×49
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 24 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned knowledge · ×40
  • Orphaned knowledge src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorStockReturnJson.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceApi.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Result/TenPayV3Results.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponsReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateBusifavorStockRequestData.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/WiFi/WiFiApi.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.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 src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Tcb/TcbApi.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivitiesReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivityReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/SyncPayServiceOrderReturnJson.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/Enums.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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Corpgroup/CorpgroupApi.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/PayScoreApis.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateUniqueThresholdActivityRequestData.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.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 src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryApi.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/CreateServiceOrderReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/NotifyJson/PayNotifyJson.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.
  • + 15 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×19
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · WriteOnlyPrivateField · ×17
  • WriteOnlyPrivateField Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Controllers/CaseCollectionController.cs:13 — private Microsoft.AspNetCore.Hosting.IHostingEnvironment _env — 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 Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/CaseCollectionController.cs:13 — private Microsoft.AspNetCore.Hosting.IHostingEnvironment _env — 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:29 — private ILogger<HomeController> _logger — 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:29 — private ILogger<HomeController> _logger — 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:9 — private ILogger<HomeController> _logger — 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:9 — private ILogger<HomeController> _logger — 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:9 — private ILogger<HomeController> _logger — 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:9 — private ILogger<HomeController> _logger — 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:9 — private ILogger<HomeController> _logger — 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:9 — private ILogger<HomeController> _logger — 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:16 — private string appSecret — 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:23 — private string appSecret — 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:16 — private string appSecret — 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:43 — private Func<string> _getRandomFileName — 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:53 — private IServiceProvider _serviceProvider — 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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/TenPayHttpClient.cs:98 — private string CaFile — assigned 2 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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:104 — private string Charset — 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.
S1 · Cryptographic Hygiene · Cryptographic key material is a compile-time constant · ×8
  • Cryptographic key material is a compile-time constant REDACTED:891 — `password` is the private-key passphrase and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
  • Cryptographic key material is a compile-time constant REDACTED:940 — `password` is the private-key passphrase and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
  • Cryptographic key material is a compile-time constant REDACTED:844 — `password` is the private-key passphrase and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
  • Cryptographic key material is a compile-time constant REDACTED:893 — `password` is the private-key passphrase and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
  • Cryptographic key material is a compile-time constant REDACTED:891 — `password` is the private-key passphrase and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
  • Cryptographic key material is a compile-time constant REDACTED:940 — `password` is the private-key passphrase and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
  • Cryptographic key material is a compile-time constant REDACTED:895 — `password` is the private-key passphrase and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
  • Cryptographic key material is a compile-time constant REDACTED:944 — `password` is the private-key passphrase and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
AX3 · Project dependency cycles · Namespace dependency cycle · ×7
  • Namespace dependency cycle src/Senparc.Weixin/Senparc.Weixin/Exceptions/ErrorJsonResultException.cs:39 — The namespaces Senparc.Weixin ↔ Senparc.Weixin.Entities ↔ Senparc.Weixin.Exceptions depend on each other. The lightest dependency in the cycle is Senparc.Weixin.Exceptions → Senparc.Weixin.Entities (Senparc.Weixin.Exceptions.ErrorJsonResultException → Senparc.Weixin.Entities.WxJsonResult, 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 src/Senparc.Weixin/Senparc.Weixin/Containers/BaseContainer.cs:77 — The namespaces Senparc.Weixin.Cache ↔ Senparc.Weixin.Containers depend on each other. The lightest dependency in the cycle is Senparc.Weixin.Containers → Senparc.Weixin.Cache (Senparc.Weixin.Containers.BaseContainer → Senparc.Weixin.Cache.IContainerCacheStrategy, 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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs:43 — The namespaces Senparc.Weixin.MP ↔ Senparc.Weixin.MP.AdvancedAPIs.AutoReply depend on each other. The lightest dependency in the cycle is Senparc.Weixin.MP → Senparc.Weixin.MP.AdvancedAPIs.AutoReply (Senparc.Weixin.MP.MenuFull_RootButton → Senparc.Weixin.MP.AdvancedAPIs.AutoReply.NewsInfo, 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 src/Senparc.Weixin.Open/Senparc.Weixin.Open/Register.cs:42 — The namespaces Senparc.Weixin.Open ↔ Senparc.Weixin.Open.ComponentAPIs depend on each other. The lightest dependency in the cycle is Senparc.Weixin.Open → Senparc.Weixin.Open.ComponentAPIs (Senparc.Weixin.Open.Register → Senparc.Weixin.Open.ComponentAPIs.RefreshAuthorizerTokenResult, 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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/Register.cs:26 — The namespaces Senparc.Weixin.TenPay ↔ Senparc.Weixin.TenPay.V3 depend on each other. The lightest dependency in the cycle is Senparc.Weixin.TenPay → Senparc.Weixin.TenPay.V3 (Senparc.Weixin.TenPay.Register → Senparc.Weixin.TenPay.V3.TenPayV3Info, 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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Security/SecurityEchoNotifyHandlerExtensions.cs:22 — The namespaces Senparc.Weixin.TenPayV3 ↔ Senparc.Weixin.TenPayV3.Apis.FundApp ↔ Senparc.Weixin.TenPayV3.Apis.Security depend on each other. The lightest dependency in the cycle is Senparc.Weixin.TenPayV3 → Senparc.Weixin.TenPayV3.Apis.Security (Senparc.Weixin.TenPayV3.SecurityEchoNotifyHandlerExtensions → Senparc.Weixin.TenPayV3.Apis.Security.SecurityEchoNotifyJson, 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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs:44 — The namespaces Senparc.Weixin.Work ↔ Senparc.Weixin.Work.Entities depend on each other. The lightest dependency in the cycle is Senparc.Weixin.Work → Senparc.Weixin.Work.Entities (Senparc.Weixin.Work.RequestMessageFactory → Senparc.Weixin.Work.Entities.EncryptPostData, 3 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.
D17 · Explicit Debt · EmptyCatchBlock · ×7
  • EmptyCatchBlock Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:582 — 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:96 — 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 Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:230 — 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 src/Senparc.WebSocket/src/Senparc.WebSocket/Senparc.WebSocket/Routes/WebSocketHandler/WebSocketHandler_Common.cs:106 — 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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MsgAudit/MsgAuditFinanceClient.cs:360 — 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 src/Senparc.Weixin/Senparc.Weixin/Trace/WeixinTrace.cs:151 — 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 src/Senparc.Weixin/Senparc.Weixin/Trace/WeixinTrace.cs:183 — 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D10 · Test Quality · Assertions commented out · ×5
  • Assertions commented out: ContextTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/MessageHandlers/MessageHandlersTest.cs:269 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
  • Assertions commented out: RestoreTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/MessageHandlers/MessageHandlersTest.cs:318 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
  • Assertions commented out: MutipleThreadsTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/MessageHandlers/MessageHandlersTest.cs:328 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
  • Assertions commented out: RegisterContainerCacheStrategyTest src/Senparc.Weixin/Senparc.WeixinTests/Cache/CacheStrategyFactoryTests.cs:35 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
  • Assertions commented out: GetCollectionListTest src/Senparc.Weixin/Senparc.WeixinTests/Containers/BaseContainerTests.cs:63 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
D10 · Test Quality · No assertions (empty test) · ×4
  • No assertions (empty test): GetAuthorizeUrlTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/OAuth/OAuthTest.cs:33 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): LockTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/Containers/AccessTokenContainerLockTest.cs:34 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): OrderQueryTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/TenPayLibV3/TenPayV3/TenPayTest.cs:33 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): DownLoadTest src/Senparc.Weixin/Senparc.WeixinTests/Utilities/HttpUtility/PostTests.cs:102 — Test method has an empty body — it asserts nothing and exercises no code.
D13 · REDACTED Scanning · Leaked secret · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · BlanketAnalyzerSeverityNone · ×1
  • BlanketAnalyzerSeverityNone eng/Quality/quality.globalconfig:5 — dotnet_analyzer_diagnostic.severity = none — every analyzer rule — this is not one rule switched off, it is a whole set the file never lists: every rule the entry covers is silenced for every file the section matches, in every project under this directory, and any rule added to that set by a future analyzer upgrade is silenced too, without anybody deciding so. It reads as narrower than it is — the analyzers still run and the build still looks configured — and because no rule is named there is nothing for a reader to look up and no list that will ever disclose what is covered. Replace it with the rules you actually mean to switch off, each on its own line, so the set is finite, visible and reviewable, and the ones nobody chose keep protecting the tree. If the blanket entry is genuinely right, link the decision from a comment above it: a comment that only restates the entry is what the editor generates when it writes this line, so it is a reference to the decision — an issue or a ticket — that clears this row.
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
S1 · Cryptographic Hygiene · Weak hash is the integrity check · ×1
  • Weak hash is the integrity check src/Senparc.Weixin.Work.Middleware/MessageHandlers/Middleware/WorkMessageHandlerMiddleware.cs:115 — A digest from `GenarateSinature` (MD5/SHA1) is compared against an expected value here, and a mismatch rejects the input — so a collision-broken hash IS the integrity check.
Serious — 2277 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 413 more in this group — see findings.md.
D17 · Explicit Debt · CommentedOutCode · ×327
  • CommentedOutCode Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:160 — 3 consecutive commented-code lines
  • CommentedOutCode Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WebSocket/CustomNet45WebSocketMessageHandler.cs:77 — 3 consecutive commented-code lines
  • CommentedOutCode Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WebSocket/CustomNetCoreWebSocketMessageHandler.cs:73 — 3 consecutive commented-code lines
  • CommentedOutCode Samples/All/Senparc.Weixin.Sample.CommonService/TemplateMessageService.cs:30 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:42 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:291 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:80 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:84 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:88 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:92 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:96 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:100 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:104 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:108 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:112 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:116 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:120 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:124 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:128 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:132 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:136 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:140 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:635 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:685 — 3 consecutive commented-code lines
  • CommentedOutCode REDACTED:696 — 3 consecutive commented-code lines
  • + 302 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×208
  • TodoComment Samples/All/Senparc.Weixin.Sample.CommonService/EventService.cs:163 — //TODO:防止更多的接口自身错误导致的无限递归。 — 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 Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageContext.cs:46 — //TODO:这里根据需要执行消息过期时候的逻辑,下面的代码仅供参考 — 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 Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageContext.cs:41 — //TODO:这里根据需要执行消息过期时候的逻辑,下面的代码仅供参考 — 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 Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageContext.cs:45 — //TODO:这里根据需要执行消息过期时候的逻辑,下面的代码仅供参考 — 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 Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageContext.cs:46 — //TODO:这里根据需要执行消息过期时候的逻辑,下面的代码仅供参考 — 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 Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageContext.cs:41 — //TODO:这里根据需要执行消息过期时候的逻辑,下面的代码仅供参考 — 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 Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageContext.cs:45 — //TODO:这里根据需要执行消息过期时候的逻辑,下面的代码仅供参考 — 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 Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:662 — //TODO: 对Event信息进行统一操作 — 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 Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:310 — //TODO: 对Event信息进行统一操作 — 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 Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WebSocket/CustomNet45WebSocketMessageHandler.cs:23 — //TODO:处理连接时的逻辑 — 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 Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WebSocket/CustomNetCoreWebSocketMessageHandler.cs:20 — //TODO:处理连接时的逻辑 — 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 Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WebSocket/CustomNet45WebSocketMessageHandler.cs:29 — //TODO:处理断开连接时的逻辑 — 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 Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WebSocket/CustomNetCoreWebSocketMessageHandler.cs:26 — //TODO:处理断开连接时的逻辑 — 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 Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:111 — //TODO:这里的逻辑可以交给Service处理具体信息,参考OnLocationRequest方法或/Service/LocationSercice.cs — 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 Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:104 — //TODO:这里的逻辑可以交给Service处理具体信息,参考OnLocationRequest方法或/Service/LocationSercice.cs — 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 REDACTED:153 — //TODO:删除临时文件 — 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 REDACTED:135 — //TODO:删除临时文件 — 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 REDACTED:160 — //TODO:根据"conditionalmenu"判断自定义菜单 — 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 REDACTED:158 — //TODO:根据"conditionalmenu"判断自定义菜单 — 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 REDACTED:160 — //TODO:根据"conditionalmenu"判断自定义菜单 — 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 REDACTED:68 — //TODO:交给Service处理具体信息,参考/Service/EventSercice.cs 及 /Service/LocationSercice.cs — 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 REDACTED:66 — //TODO:交给Service处理具体信息,参考/Service/EventSercice.cs 及 /Service/LocationSercice.cs — 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 REDACTED:68 — //TODO:交给Service处理具体信息,参考/Service/EventSercice.cs 及 /Service/LocationSercice.cs — 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 REDACTED:86 — //TODO:交给Service处理具体信息 — 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 REDACTED:109 — //TODO:交给Service处理具体信息 — 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.
  • + 183 more in this group — see findings.md.
D17 · Explicit Debt · ObsoleteWithCallers · ×41
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/User/UserJson/UserInfoJson.cs:65 — [Obsolete] nickname
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/User/UserJson/UserInfoJson.cs:70 — [Obsolete] sex
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/User/UserJson/UserInfoJson.cs:79 — [Obsolete] city
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/User/UserJson/UserInfoJson.cs:84 — [Obsolete] province
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/User/UserJson/UserInfoJson.cs:89 — [Obsolete] country
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/User/UserJson/UserInfoJson.cs:94 — [Obsolete] headimgurl
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:158 — [Obsolete] Register
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:137 — [Obsolete] Register
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/OAuthAccessTokenContainer.cs:137 — [Obsolete] Register
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/WxCardApiTicketContainer.cs:106 — [Obsolete] Register
  • ObsoleteWithCallers src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/ComponentContainer.cs:220 — [Obsolete] Register
  • ObsoleteWithCallers src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/AccessTokenContainer.cs:218 — [Obsolete] Register
  • ObsoleteWithCallers src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/JsApiTicketContainer.cs:150 — [Obsolete] Register
  • ObsoleteWithCallers src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/ProviderTokenContainer.cs:146 — [Obsolete] Register
  • ObsoleteWithCallers src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.cs:84 — [Obsolete] Register
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/Menu/Buttons/SingleMediaIdButton.cs:42 — [Obsolete] SingleMediaIdButton
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/Menu/Buttons/SingleViewLimitedButton.cs:42 — [Obsolete] SingleViewLimitedButton
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/Request/Event/WeApp/RequestMessageEvent_WeAppAuditFail.cs:39 — [Obsolete] RequestMessageEvent_WeAppAuditFail
  • ObsoleteWithCallers src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/Request/Event/WeApp/RequestMessageEvent_WeAppAuditSuccess.cs:39 — [Obsolete] RequestMessageEvent_WeAppAuditSuccess
  • ObsoleteWithCallers src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/AuthorizerContainer.cs:201 — [Obsolete] TryRegister
  • ObsoleteWithCallers src/Senparc.Weixin.Open/Senparc.Weixin.Open/MessageHandlers/ThirdPartyMessageHandler.cs:99 — [Obsolete] Execute
  • ObsoleteWithCallers src/Senparc.Weixin.Open/Senparc.Weixin.Open/MessageHandlers/ThirdPartyMessageHandler.cs:105 — [Obsolete] OnExecuting
  • ObsoleteWithCallers src/Senparc.Weixin.Open/Senparc.Weixin.Open/MessageHandlers/ThirdPartyMessageHandler.cs:110 — [Obsolete] OnExecuted
  • ObsoleteWithCallers src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:311 — [Obsolete] Unifiedorder
  • ObsoleteWithCallers src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:413 — [Obsolete] OrderQuery
  • + 16 more in this group — see findings.md.
X2 · Cancellation propagation · Async method without CancellationToken · ×39
  • Async method without CancellationToken: GetAppInfoAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/App/AppApi.cs:127 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: SetAppAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/App/AppApi.cs:146 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetAppListAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/App/AppApi.cs:167 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: BatchSyncUserAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Asynchronous/AsynchronousApi.cs:281 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: BatchReplaceUserAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Asynchronous/AsynchronousApi.cs:323 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: BatchReplacePartyAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Asynchronous/AsynchronousApi.cs:365 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetReplaceUserResultAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Asynchronous/AsynchronousApi.cs:389 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetReplacePartyResultAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Asynchronous/AsynchronousApi.cs:408 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: AddAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Calendar/CalendarApi.cs:111 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: UpdateAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Calendar/CalendarApi.cs:127 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Calendar/CalendarApi.cs:143 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: DelAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Calendar/CalendarApi.cs:164 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CreateChatAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:337 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetChatAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:359 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: UpdateChatAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:379 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: SendChatSimpleMessageAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:406 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: SendChatVideoMessageAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:443 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: SendChatTextCardMessageAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:464 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: SendChatNewsMessageAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:481 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: SendChatMpNewsMessageAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:498 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: QuitChatAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:515 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: ClearNotifyAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:541 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: SetMuteAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:583 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: TwoVerificationAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Concern/ConcernApi.cs:72 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CorpListAppShareInfoAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Corpgroup/CorpgroupApi.cs:330 — No CancellationToken parameter — this work can't be stopped early once started.
  • + 14 more in this group — see findings.md.
X5 · Nullable reference types · Symbol treated as nullable, then dereferenced unguarded · ×39
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:141 — This method contradicts itself about `fullButton`: line 140 assigns it with `as Dictionary<string, object>`, which hands back null rather than throwing when the value is not a `Dictionary<string, object>`, but line 141 then dereferences it directly as `fullButton.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 `fullButton` once before the first use and handle the null case, or cast with `(Dictionary<string, object>)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:203 — This method contradicts itself about `strongRequestMessage`: line 200 assigns it with `as IRequestMessageEventBase`, which hands back null rather than throwing when the value is not a `IRequestMessageEventBase`, but line 203 then dereferences it directly as `strongRequestMessage.Event` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEventBase)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:266 — This method contradicts itself about `ccRequestMessage`: line 264 assigns it with `as IRequestMessageEvent_Change_Contact_Base`, which hands back null rather than throwing when the value is not a `IRequestMessageEvent_Change_Contact_Base`, but line 266 then dereferences it directly as `ccRequestMessage.ChangeType` 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 `ccRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEvent_Change_Contact_Base)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:312 — This method contradicts itself about `cecRequestMessage`: line 310 assigns it with `as IRequestMessageEvent_Change_ExternalContact_Base`, which hands back null rather than throwing when the value is not a `IRequestMessageEvent_Change_ExternalContact_Base`, but line 312 then dereferences it directly as `cecRequestMessage.ChangeType` 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 `cecRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEvent_Change_ExternalContact_Base)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:355 — This method contradicts itself about `cechat`: line 353 assigns it with `as RequestMessageEvent_Change_External_Chat_Base`, which hands back null rather than throwing when the value is not a `RequestMessageEvent_Change_External_Chat_Base`, but line 355 then dereferences it directly as `cechat.ChangeType` 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 `cechat` once before the first use and handle the null case, or cast with `(RequestMessageEvent_Change_External_Chat_Base)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:381 — This method contradicts itself about `tag`: line 379 assigns it with `as RequestMessageEvent_Change_External_Tag_Base`, which hands back null rather than throwing when the value is not a `RequestMessageEvent_Change_External_Tag_Base`, but line 381 then dereferences it directly as `tag.ChangeType` 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 `tag` once before the first use and handle the null case, or cast with `(RequestMessageEvent_Change_External_Tag_Base)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:1240 — This method contradicts itself about `cecRequestMessage`: line 1238 assigns it with `as IRequestMessageEvent_Change_ExternalContact_Base`, which hands back null rather than throwing when the value is not a `IRequestMessageEvent_Change_ExternalContact_Base`, but line 1240 then dereferences it directly as `cecRequestMessage.ChangeType` 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 `cecRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEvent_Change_ExternalContact_Base)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:301 — This method contradicts itself about `sLeft`: line 299 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 301 then dereferences it directly as `sLeft.Length` 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 `sLeft` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:302 — This method contradicts itself about `sRight`: line 300 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 302 then dereferences it directly as `sRight.Length` 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 `sRight` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:233 — This method contradicts itself about `sLeft`: line 231 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 233 then dereferences it directly as `sLeft.Length` 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 `sLeft` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:234 — This method contradicts itself about `sRight`: line 232 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 234 then dereferences it directly as `sRight.Length` 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 `sRight` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs:185 — This method contradicts itself about `fullButton`: line 184 assigns it with `as Dictionary<string, object>`, which hands back null rather than throwing when the value is not a `Dictionary<string, object>`, but line 185 then dereferences it directly as `fullButton.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 `fullButton` once before the first use and handle the null case, or cast with `(Dictionary<string, object>)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/Async/MessageHandlerAsync.Event.cs:56 — This method contradicts itself about `strongRequestMessage`: line 52 assigns it with `as IRequestMessageEventBase`, which hands back null rather than throwing when the value is not a `IRequestMessageEventBase`, but line 56 then dereferences it directly as `strongRequestMessage.Event` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEventBase)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.Event.cs:58 — This method contradicts itself about `strongRequestMessage`: line 54 assigns it with `as IRequestMessageEventBase`, which hands back null rather than throwing when the value is not a `IRequestMessageEventBase`, but line 58 then dereferences it directly as `strongRequestMessage.Event` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEventBase)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.Event.cs:85 — This method contradicts itself about `strongRequestMessage`: line 83 assigns it with `as IRequestMessageEventBase`, which hands back null rather than throwing when the value is not a `IRequestMessageEventBase`, but line 85 then dereferences it directly as `strongRequestMessage.Event` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEventBase)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.Event.cs:503 — This method contradicts itself about `strongRequestMessage`: line 501 assigns it with `as IRequestMessageEventBase`, which hands back null rather than throwing when the value is not a `IRequestMessageEventBase`, but line 503 then dereferences it directly as `strongRequestMessage.Event` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(IRequestMessageEventBase)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:138 — This method contradicts itself about `baseCacheStrategy`: line 135 assigns it with `as RedisHashSetObjectCacheStrategy`, which hands back null rather than throwing when the value is not a `RedisHashSetObjectCacheStrategy`, but line 138 then dereferences it directly as `baseCacheStrategy.GetFinalKey` 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 `baseCacheStrategy` once before the first use and handle the null case, or cast with `(RedisHashSetObjectCacheStrategy)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:167 — This method contradicts itself about `baseCacheStrategy`: line 164 assigns it with `as RedisHashSetObjectCacheStrategy`, which hands back null rather than throwing when the value is not a `RedisHashSetObjectCacheStrategy`, but line 167 then dereferences it directly as `baseCacheStrategy.GetFinalKey` 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 `baseCacheStrategy` once before the first use and handle the null case, or cast with `(RedisHashSetObjectCacheStrategy)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:49 — This method contradicts itself about `openId`: line 47 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 49 then dereferences it directly as `openId.IsNullOrEmpty` 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 `openId` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:132 — This method contradicts itself about `addConditionalButtonGroup`: line 131 assigns it with `as ConditionalButtonGroup`, which hands back null rather than throwing when the value is not a `ConditionalButtonGroup`, but line 132 then dereferences it directly as `addConditionalButtonGroup.matchrule` 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 `addConditionalButtonGroup` once before the first use and handle the null case, or cast with `(ConditionalButtonGroup)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:75 — This method contradicts itself about `strongRequestMessage`: line 69 assigns it with `as RequestMessageText`, which hands back null rather than throwing when the value is not a `RequestMessageText`, but line 75 then dereferences it directly as `strongRequestMessage.Content` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(RequestMessageText)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:94 — This method contradicts itself about `strongRequestMessage`: line 87 assigns it with `as RequestMessageImage`, which hands back null rather than throwing when the value is not a `RequestMessageImage`, but line 94 then dereferences it directly as `strongRequestMessage.PicUrl` 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 `strongRequestMessage` once before the first use and handle the null case, or cast with `(RequestMessageImage)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:178 — This method contradicts itself about `workSetting`: line 174 assigns it with `as ISenparcWeixinSettingForWork`, which hands back null rather than throwing when the value is not a `ISenparcWeixinSettingForWork`, but line 178 then dereferences it directly as `workSetting.WeixinCorpId` 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 `workSetting` once before the first use and handle the null case, or cast with `(ISenparcWeixinSettingForWork)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:138 — This method contradicts itself about `baseCacheStrategy`: line 135 assigns it with `as RedisHashSetObjectCacheStrategy`, which hands back null rather than throwing when the value is not a `RedisHashSetObjectCacheStrategy`, but line 138 then dereferences it directly as `baseCacheStrategy.GetFinalKey` 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 `baseCacheStrategy` once before the first use and handle the null case, or cast with `(RedisHashSetObjectCacheStrategy)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:167 — This method contradicts itself about `baseCacheStrategy`: line 164 assigns it with `as RedisHashSetObjectCacheStrategy`, which hands back null rather than throwing when the value is not a `RedisHashSetObjectCacheStrategy`, but line 167 then dereferences it directly as `baseCacheStrategy.GetFinalKey` 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 `baseCacheStrategy` once before the first use and handle the null case, or cast with `(RedisHashSetObjectCacheStrategy)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • + 14 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×38
  • TooManyMethods: MeetingApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingApi.Layout.cs — TooManyMethods — 1101 significant lines (blank, comment-only and punctuation-only lines excluded), 214 methods, declared across 12 files: Meeting/MeetingApi.Layout.cs (32), Meeting/MeetingApi.Webinar.cs (28), Meeting/MeetingApi.cs (26), Meeting/MeetingApi.Rooms.cs (24), +8 more file(s). The bar is 30 methods; this is 184 over it, 7.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: WorkMessageHandler src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/WorkMessageHandler.cs — TooManyMethods — 993 significant lines (blank, comment-only and punctuation-only lines excluded), 189 methods, declared across 2 files: MessageHandlers/WorkMessageHandler.cs (96), Async/WorkMessageHandler.Async.cs (93). The bar is 30 methods; this is 159 over it, 6.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: ExternalApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.cs — TooManyMethods — 953 significant lines (blank, comment-only and punctuation-only lines excluded), 178 methods, declared across 6 files: External/ExternalApi.cs (84), External/ExternalCustomerManagementApi.cs (24), External/ExternalMomentApi.cs (24), External/ExternalCatalogApi.cs (22), +2 more file(s). The bar is 30 methods; this is 148 over it, 5.93× 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: MessageHandler src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/Async/MessageHandlerAsync.Event.cs — TooManyMethods — 825 significant lines (blank, comment-only and punctuation-only lines excluded), 155 methods, declared across 6 files: Async/MessageHandlerAsync.Event.cs (61), MessageHandlers/MessageHandler.Event.cs (61), Async/MessageHandlerAsync.Message.cs (12), MessageHandlers/MessageHandler.Message.cs (11), +2 more file(s). The bar is 30 methods; this is 125 over it, 5.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: WeDocApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/WeDoc/WeDocApi.SmartDoc.cs — TooManyMethods — 514 significant lines (blank, comment-only and punctuation-only lines excluded), 133 methods, declared across 11 files: WeDoc/WeDocApi.SmartDoc.cs (34), WeDoc/WeDocApi.cs (33), WeDoc/WeDocApi.SmartSheet.cs (12), WeDoc/WeDocApi.Form.cs (10), +7 more file(s). The bar is 30 methods; this is 103 over it, 4.43× 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: MiniDramaApi src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/MiniDrama/MiniDramaApi.cs — TooManyMethods — 224 significant lines (blank, comment-only and punctuation-only lines excluded), 89 methods, declared across 4 files: MiniDrama/MiniDramaApi.cs (29), MiniDrama/MiniDramaAuthorizationApi.cs (22), MiniDrama/MiniDramaAuditApi.cs (20), MiniDrama/MiniDramaPlayerApi.cs (18). The bar is 30 methods; this is 59 over it, 2.97× 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: SchoolApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/School/SchoolApi.User.cs — TooManyMethods — 322 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods, declared across 3 files: School/SchoolApi.User.cs (38), School/SchoolApi.cs (25), School/SchoolApi.Service.cs (22). The bar is 30 methods; this is 55 over it, 2.83× 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: WxOpenMessageHandler src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.Event.cs — TooManyMethods — 457 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods, declared across 3 files: MessageHandlers/WxOpenMessageHandler.Event.cs (68), MessageHandlers/WxOpenMessageHandler.cs (9), MessageHandlers/WxOpenMessageHandler.Message.cs (6). 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: CloudBaseApi src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBase/CloudBaseApi.cs — TooManyMethods — 307 significant lines (blank, comment-only and punctuation-only lines excluded), 82 methods. The bar is 30 methods; this is 52 over it, 2.73× 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: XPayApi src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs — TooManyMethods — 419 significant lines (blank, comment-only and punctuation-only lines excluded), 81 methods, declared across 2 files: XPay/XPayApi.cs (73), XPay/XPayIncrementApi.cs (8). The bar is 30 methods; this is 51 over it, 2.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: LiveBroadcastApi src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/LiveBroadcast/LiveBroadcastApi.cs — TooManyMethods — 184 significant lines (blank, comment-only and punctuation-only lines excluded), 81 methods, declared across 3 files: LiveBroadcast/LiveBroadcastApi.cs (57), LiveBroadcast/LiveBroadcastGoodsApi.cs (14), LiveBroadcast/LiveBroadcastRoleSubscriptionApi.cs (10). The bar is 30 methods; this is 51 over it, 2.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: TenPayV3 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs — TooManyMethods — 659 significant lines (blank, comment-only and punctuation-only lines excluded), 80 methods, declared across 3 files: Universal/TenPayV3.cs (64), Customs/TenPayV3.Customs.cs (10), Universal/TenpayV3.PayBank.cs (6). The bar is 30 methods; this is 50 over it, 2.67× 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: WeixinExpressApi src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressIntracityApi.cs — TooManyMethods — 168 significant lines (blank, comment-only and punctuation-only lines excluded), 76 methods, declared across 4 files: WeixinExpress/WeixinExpressIntracityApi.cs (32), WeixinExpress/WeixinExpressInsuranceApi.cs (22), WeixinExpress/WeixinExpressApi.cs (16), WeixinExpress/WeixinExpressReturnApi.cs (6). The bar is 30 methods; this is 46 over it, 2.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: CloudBaseBatchApi src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBaseBatch/CloudBaseBatchApi.cs — TooManyMethods — 273 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 30 methods; this is 41 over it, 2.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: B2BApi src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/B2B/B2BOrderApi.cs — TooManyMethods — 158 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods, declared across 4 files: B2B/B2BOrderApi.cs (20), B2B/B2BMerchantApi.cs (18), B2B/B2BProfitSharingApi.cs (18), B2B/B2BApi.cs (15). The bar is 30 methods; this is 41 over it, 2.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: EcommerceApis src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/EcommerceApis.AccountFunds.cs — TooManyMethods — 436 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods, declared across 6 files: Ecommerce/EcommerceApis.AccountFunds.cs (18), Ecommerce/EcommerceApis.MerchantCancellation.cs (15), Ecommerce/EcommerceApis.Refunds.cs (11), Ecommerce/EcommerceApis.CrossBorder.cs (9), +2 more file(s). The bar is 30 methods; this is 38 over it, 2.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: ChatDataApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/DataIntelligence/ChatDataApi.cs — TooManyMethods — 299 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 30 methods; this is 34 over it, 2.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: WeDriveApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/WeDrive/WeDriveApi.File.cs — TooManyMethods — 238 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods, declared across 3 files: WeDrive/WeDriveApi.File.cs (34), WeDrive/WeDriveApi.cs (20), WeDrive/WeDriveApi.Management.cs (10). The bar is 30 methods; this is 34 over it, 2.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: WxAppApi src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs — TooManyMethods — 615 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. 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: WeChatCustomerServiceApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/WeChatCustomerService/WeChatCustomerServiceApi.cs — TooManyMethods — 130 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods, declared across 2 files: WeChatCustomerService/WeChatCustomerServiceApi.cs (58), WeChatCustomerService/WeChatCustomerServiceQualificationApi.cs (2). The bar is 30 methods; this is 30 over it, 2.00× 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: LicenseApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/License/LicenseApi.Order.cs — TooManyMethods — 347 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods, declared across 4 files: License/LicenseApi.Order.cs (26), License/LicenseApi.Account.cs (18), License/LicenseApi.Settings.cs (10), License/LicenseApi.cs (4). The bar is 30 methods; this is 28 over it, 1.93× 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: ProductCouponApis src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/ProductCoupon/ProductCouponApis.cs — TooManyMethods — 369 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OpenHardwareApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/OpenHardware/OpenHardwareApi.Device.cs — TooManyMethods — 318 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods, declared across 5 files: OpenHardware/OpenHardwareApi.Device.cs (24), OpenHardware/OpenHardwareApi.Attendance.cs (10), OpenHardware/OpenHardwareApi.Printer.cs (10), OpenHardware/OpenHardwareApi.cs (6), +1 more file(s). The bar is 30 methods; this is 25 over it, 1.83× 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: ExmailApi REDACTED — TooManyMethods — 220 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods, declared across 5 files: REDACTED (15), Exmail/ExmailApi.cs (14), Exmail/ExmailApi.Group.cs (12), Exmail/ExmailApi.Account.cs (8), +1 more file(s). The bar is 30 methods; this is 25 over it, 1.83× 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: AmsApi src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Ams/AmsApi.cs — TooManyMethods — 219 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 30 methods; this is 25 over it, 1.83× 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.
  • + 13 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×32
  • Duplicated block (5 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:581 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:581-585 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:706-710 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:581` 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:79 — REDACTED:79-83 | REDACTED:125-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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: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 (5 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/CommonApi.cs:444 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/CommonApi.cs:444-453 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/OpenAPIs/OpenApi.cs:212-216 — 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/CommonApi.cs:444` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:31 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:31-35 | src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:51-55 — before extracting anything, compare `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs` and `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:39 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:39-43 | src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:59-63 — before extracting anything, compare `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs` and `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBase/CloudBaseApi.cs:852 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBase/CloudBaseApi.cs:852-856 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBaseBatch/CloudBaseBatchApi.cs:741-745 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBase/CloudBaseApi.cs:852 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBase/CloudBaseApi.cs:852-856 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBaseBatch/CloudBaseBatchApi.cs:741-745 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Face/FaceApi.cs:114 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Face/FaceApi.cs:114-118 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Soter/SoterApi.cs:67-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Face/FaceApi.cs:122 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Face/FaceApi.cs:122-126 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Soter/SoterApi.cs:75-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/LiveBroadcast/LiveBroadcastApi.cs:542 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/LiveBroadcast/LiveBroadcastApi.cs:542-546 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/TransactionGuarantee/TransactionGuaranteeApi.cs:499-505 — 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 (5 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/LiveBroadcast/LiveBroadcastApi.cs:550 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/LiveBroadcast/LiveBroadcastApi.cs:550-554 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/TransactionGuarantee/TransactionGuaranteeApi.cs:509-515 — 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 (5 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/MiniDrama/MiniDramaApi.cs:265 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/MiniDrama/MiniDramaApi.cs:265-269 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Novel/NovelApi.cs:313-317 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `MiniDramaMediaIdRequest` in one and `NovelBookIdRequest` 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) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/MiniDrama/MiniDramaApi.cs:273 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/MiniDrama/MiniDramaApi.cs:273-277 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Novel/NovelApi.cs:321-325 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `MiniDramaMediaIdRequest` in one and `NovelBookIdRequest` 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) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Face/FaceApi.cs:114 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Face/FaceApi.cs:114-118 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Soter/SoterApi.cs:67-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Face/FaceApi.cs:122 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Face/FaceApi.cs:122-126 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Soter/SoterApi.cs:75-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/MiniDrama/MiniDramaApi.cs:265 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/MiniDrama/MiniDramaApi.cs:265-269 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Novel/NovelApi.cs:313-317 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `MiniDramaMediaIdRequest` in one and `NovelBookIdRequest` 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) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/MiniDrama/MiniDramaApi.cs:273 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/MiniDrama/MiniDramaApi.cs:273-277 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Novel/NovelApi.cs:321-325 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `MiniDramaMediaIdRequest` in one and `NovelBookIdRequest` 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:117 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:117-121 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/ProfitsharingApis.cs:84-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/CommonApi.cs:466 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/CommonApi.cs:466-470 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/OpenAPIs/OpenApi.cs:229-233 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/CommonApi.cs:466` 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) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:355 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:355-359 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:105-109 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:355` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) REDACTED:177 — REDACTED:177-181 | REDACTED:177-181 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) REDACTED:295 — REDACTED:295-299 | REDACTED:295-299 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:237 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:237-241 | Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:221-225 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs` and `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) REDACTED:24 — REDACTED:24-28 | REDACTED:24-28 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) REDACTED:33 — REDACTED:33-37 | REDACTED:33-37 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • + 7 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×25
  • Duplicated block (6 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1297 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1297-1302 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1327-1332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1297` 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/WeChatCustomerService/WeChatCustomerServiceJson.cs:215 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/WeChatCustomerService/WeChatCustomerServiceJson.cs:215-220 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/WeChatCustomerService/WeChatCustomerServiceJson.cs:316-321 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:403 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:403-408 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:419-424 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:403` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:394 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:394-399 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:410-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:394` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:314 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:314-319 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1087-1092 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:451 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:451-456 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1218-1223 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:765 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:765-770 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1338-1343 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:801 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:801-806 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1372-1377 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:840 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:840-845 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1405-1410 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:875 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:875-880 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1440-1445 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:1118 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:1118-1123 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:1134-1139 — both copies are in the same file, so extract the 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `SendMiniProgramNoticeData` in one and `SendTaskCardNoticeData` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3PayToWorkerRequestData.cs:207 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3PayToWorkerRequestData.cs:207-212 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3TransfersRequestData.cs:175-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, `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3TransfersRequestData.cs:172` calls `SetParameter` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3PayToWorkerRequestData.cs:205` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:432 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:432-437 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1200-1205 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:669 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:669-674 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1272-1277 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:818 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:818-823 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1388-1393 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:856 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:856-861 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1421-1426 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/CancelServiceOrderReturnJson.cs:64 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/CancelServiceOrderReturnJson.cs:64-69 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/PayServiceOrderReturnJson.cs:64-69 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/CancelServiceOrderReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/PayServiceOrderReturnJson.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.
  • Duplicated block (6 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/RequestMessageFactory.cs:125 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/RequestMessageFactory.cs:125-130 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/RequestMessageFactory.cs:118-123 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/RequestMessageFactory.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/RequestMessageFactory.cs` as WHOLE FILES: 90% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/RequestMessageFactory.cs:125 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/RequestMessageFactory.cs:125-130 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/RequestMessageFactory.cs:118-123 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/RequestMessageFactory.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/RequestMessageFactory.cs` as WHOLE FILES: 90% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/CombineTransactionsRequestData.cs:195 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/CombineTransactionsRequestData.cs:195-200 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/TransactionsRequestData.cs:618-623 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:770 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:770-775 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:788-793 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) REDACTED:36 — REDACTED:36-41 | REDACTED:36-41 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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 (6 lines × 2) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Controllers/BaseController.cs:26 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Controllers/BaseController.cs:26-31 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/BaseController.cs:26-31 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Controllers/BaseController.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/BaseController.cs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Program.cs:14 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Program.cs:14-19 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Program.cs:14-19 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Program.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Program.cs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) REDACTED:39 — REDACTED:39-44 | REDACTED:39-44 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×24
  • Sync-over-async blocking — 23 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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/AccessTokenContainer.cs:222 — `.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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/JsApiTicketContainer.cs:154 — `.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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/ProviderTokenContainer.cs:150 — `.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 src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:346 — `.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 src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:357 — `.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 src/Senparc.Weixin/Senparc.Weixin/Containers/BaseContainer.cs:522 — `.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:162 — `.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:141 — `.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/OAuthAccessTokenContainer.cs:141 — `.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/WxCardApiTicketContainer.cs:110 — `.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:292 — `.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 src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/AuthorizerContainer.cs:192 — `.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 src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/AuthorizerContainer.cs:236 — `.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 src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/ComponentContainer.cs:230 — `.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 src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/ComponentContainer.cs:275 — `.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 src/Senparc.Weixin.Open/Senparc.Weixin.Open/MessageHandlers/ThirdPartyMessageHandler.cs:102 — `.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 src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.cs:88 — `.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:726 — `.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 Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:345 — `.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 Samples/All/Senparc.Weixin.Sample.CommonService/TemplateMessageService.cs:70 — `.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayNotifyHandler.cs:112 — `.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayNotifyHandler.cs:123 — `.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:694 — `.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).
X18 · Disposal-pattern correctness · Disposable created and abandoned in the method that made it · ×23
  • Disposable created and abandoned in the method that made it src/Senparc.Weixin.MP/Senparc.Weixin.MP/CheckSignature.cs:107 — `sha1` is a `SHA1`, which implements `IDisposable`, and it is created here (line 107). Every use of it in `GetSignature` 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 sha1 = …;`), 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 src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:132 — `aes` is a `RijndaelManaged`, which implements `IDisposable`, and it is created here (line 132). Every use of it in `AES_Decrypt` 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 aes = …;`), 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 src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:184 — `cs` is a `CryptoStream`, which implements `IDisposable`, and it is created here (line 184). Every use of it in `AES_Decrypt` 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 cs = …;`), 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:139 — `fs` is a `FileStream`, which implements `IDisposable`, and it is created here (line 139). Every use of it in `Download` 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 fs = …;`), 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:102 — `bitmap` is a `Bitmap`, which implements `IDisposable`, and it is created here (line 102). Every use of it in `Index` 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 bitmap = …;`), 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:264 — `bitmap` is a `Bitmap`, which implements `IDisposable`, and it is created here (line 264). Every use of it in `Native` 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 bitmap = …;`), 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:266 — `fileStream` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 266). Every use of it in `Native` 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 fileStream = …;`), 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:910 — `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 910). Every use of it in `SendGroupRedPack` 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 streamReader = …;`), 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:958 — `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 958). Every use of it in `GetHBInfo` 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 streamReader = …;`), 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:1022 — `bitmap` is a `Bitmap`, which implements `IDisposable`, and it is created here (line 1022). Every use of it in `ProductPayCode` 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 bitmap = …;`), 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:347 — `fileStream` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 347). Every use of it in `Native` 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 fileStream = …;`), 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:914 — `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 914). Every use of it in `SendGroupRedPack` 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 streamReader = …;`), 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:962 — `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 962). Every use of it in `GetHBInfo` 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 streamReader = …;`), 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:101 — `httpClient` is a `HttpClient`, which implements `IDisposable`, and it is created here (line 101). Every use of it in `ProcessQuery` 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 httpClient = …;`), 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:139 — `fs` is a `FileStream`, which implements `IDisposable`, and it is created here (line 139). Every use of it in `Download` 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 fs = …;`), 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:84 — `bitmap` is a `Bitmap`, which implements `IDisposable`, and it is created here (line 84). Every use of it in `Index` 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 bitmap = …;`), 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:264 — `bitmap` is a `Bitmap`, which implements `IDisposable`, and it is created here (line 264). Every use of it in `Native` 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 bitmap = …;`), 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:266 — `fileStream` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 266). Every use of it in `Native` 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 fileStream = …;`), 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:910 — `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 910). Every use of it in `SendGroupRedPack` 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 streamReader = …;`), 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:958 — `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 958). Every use of it in `GetHBInfo` 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 streamReader = …;`), 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:1022 — `bitmap` is a `Bitmap`, which implements `IDisposable`, and it is created here (line 1022). Every use of it in `ProductPayCode` 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 bitmap = …;`), 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:863 — `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 863). Every use of it in `SendGroupRedPack` 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 streamReader = …;`), 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:911 — `streamReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 911). Every use of it in `GetHBInfo` 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 streamReader = …;`), which releases it at the end of the scope on every path including a throw.
D10 · Test Quality · No assertions · ×19
  • No assertions: CreateWxaQrCodeTest2 src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/WxApp/WxAppApiTests.cs:60 — 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: MediaCheckAsyncTest src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/AdvancedAPIs/WxApp/WxAppApiTests.cs:173 — 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: SerializeDataTest src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/SerializeTest.cs:42 — 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: SerializeCompareTest src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/SerializeTest.cs:55 — 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: MyTestMethod src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/WeixinRegisterTests.cs:22 — 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: TestRegisterMpAccount src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/WeixinRegisterTests.cs:31 — 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: GetAuthorizerInfoTest src/Senparc.Weixin.Open/Senparc.Weixin.Open.Test/ComponentAPIs/ComponentApi.cs:11 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — 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: GetXmlValuesTest src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay.Test/V3/TenPayV3ResultTest.cs:10 — 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: GetXmlValuesTest1 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay.Test/V3/TenPayV3ResultTest.cs:32 — 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: Markdown2Test src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/AdvancedAPIs/Webhook/WebhookApiTests.cs:33 — 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: FileTest src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/MessageHandlers/WorkMessageHandlerTest.cs:132 — 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: TestMethod1 src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/AsyncTest.cs:18 — 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: GetFullUserTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/User/CustomTest.cs:68 — 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: LocalCacheDeadLockTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/CacheTests/CacheTests.cs:43 — 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: LocalCacheDeadLockInGetTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/CacheTests/CacheTests.cs:62 — 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: MessageHandlerMiddlewareInvokeTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/MessageHandlers/Middleware/MessageHandlerMiddlewareTests.cs:37 — 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: LocalCacheLockTest src/Senparc.Weixin/Senparc.WeixinTests/Cache.Local/Lock/LocalCacheLockTests.cs:35 — 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: DownloadTest src/Senparc.Weixin/Senparc.WeixinTests/Utilities/HttpUtility/GetTests.cs:35 — 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: SetHttpProxyTest src/Senparc.Weixin/Senparc.WeixinTests/Utilities/HttpUtility/RequestUtilityTests.cs:37 — 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×19
  • Duplicated block (13 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1453 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1453-1465 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3600-3612 — both copies are in the same file, so extract the 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 (13 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1742 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1742-1754 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3889-3901 — both copies are in the same file, so extract the 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 (13 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:784 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:784-796 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:834-846 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:784` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerAcquisition/CustomerAcquisitionApi.cs:271 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerAcquisition/CustomerAcquisitionApi.cs:271-283 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerAcquisition/CustomerAcquisitionApi.cs:302-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerAcquisition/CustomerAcquisitionApi.cs:271` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `param` to `CreateCustomerAcquisitionLinkRequest` in one and `ModifyCustomerAcquisitionLinkRequest` 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 (13 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/TransactionsRequestData.cs:75 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/TransactionsRequestData.cs:75-87 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/TransactionsRequestData.cs:119-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/TransactionsRequestData.cs:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:100 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:100-112 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs:100-112 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) REDACTED:319 — REDACTED:319-331 | REDACTED:251-264 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:103 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:103-115 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/ShakeRedPackApi.cs:74-86 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/ShakeRedPackApi.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. 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) REDACTED:273 — REDACTED:273-285 | REDACTED:369-381 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:273` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) REDACTED:22 — REDACTED:22-34 | REDACTED:22-34 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) REDACTED:18 — REDACTED:18-30 | REDACTED:18-30 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) REDACTED:203 — REDACTED:203-215 | REDACTED:203-215 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) REDACTED:141 — REDACTED:141-153 | REDACTED:172-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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:141` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) REDACTED:143 — REDACTED:143-155 | REDACTED:143-155 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) REDACTED:158 — REDACTED:158-170 | REDACTED:158-170 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:683 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:683-695 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:336-348 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:221 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:221-233 | Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:205-217 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs` and `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:683 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:683-695 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:336-348 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:221 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:221-233 | Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:205-217 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs` and `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
X1 · Async correctness · Blocking `MemoryStream.Write` inside an `async` method · ×19
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/SmartRobot/SmartRobotWebSocketClient.cs:111 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1070 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1091 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1186 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1204 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1222 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1240 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1258 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1276 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1342 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1358 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1376 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1392 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1409 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1425 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1444 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1464 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1538 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1610 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×18
  • Animation without a prefers-reduced-motion guard tools/WeixinBrowserPlugin/src/styles.css:20 — `.senparc-ai-logo-button` moves (`transition: background 0.3s, box-shadow 0.3s, transform 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tools/WeixinBrowserPlugin/src/styles.css:151 — `html body.senparc-docked` moves (`transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tools/WeixinBrowserPlugin/src/styles.css:332 — `.spinner` moves (`animation: spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/chat-interface.css:21 — `.chat-hero::before` moves (`animation: float 20s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/chat-interface.css:308 — `.chat-interface` moves (`animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/chat-interface.css:323 — `.chat-feature` moves (`animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/chat-interface.css:365 — `.loading-dot` moves (`animation: loadingBounce 1.4s infinite ease-in-out both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/chat-interface.css:391 — `.response-item` moves (`animation: fadeInUp 0.6s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Scripts/global.js:13 — `).animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Scripts/global.js:19 — `).animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Scripts/global.js:28 — `).animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard REDACTED:3215 — `helper).animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard REDACTED:4935 — `).animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard REDACTED:5907 — `toShow.animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard REDACTED:5915 — `toHide.animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Scripts/global.js:13 — `).animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Scripts/global.js:19 — `).animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Scripts/global.js:28 — `).animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×18
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:179 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:179-193 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:206-220 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:232-246 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:287-301 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:415 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:415-429 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:442-456 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:468-482 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:523-537 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:402 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:402-415 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:418-431 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:393-406 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:409-422 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:214 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:214-240 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/OAuthAccessTokenContainer.cs:153-179 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/WxCardApiTicketContainer.cs:187-213 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/ComponentContainer.cs:486-517 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:384 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:384-390 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/ImmediateDelivery/ImmediateDeliveryApi.cs:434-441 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressApi.cs:262-269 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressProviderApi.cs:118-125 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:120 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:120-141 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:191-221 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:1023-1053 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:1103-1124 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3CloseOrderRequestData.cs:102 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3CloseOrderRequestData.cs:102-126 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3CloseOrderRequestData.cs:139-166 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundRequestData.cs:162-207 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundRequestData.cs:233-281 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:893 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:893-903 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:966-976 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1458-1468 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1532-1542 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:69 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:69-81 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:99-112 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs:69-81 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs:99-112 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:113 — REDACTED:113-155 | REDACTED:159-186 | REDACTED:113-155 | REDACTED:159-186 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:149 — REDACTED:149-205 | REDACTED:124-172 | REDACTED:149-205 | REDACTED:106-154 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:294 — REDACTED:294-363 | REDACTED:245-314 | REDACTED:294-363 | REDACTED:374-443 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:447 — REDACTED:447-470 | REDACTED:385-408 | REDACTED:447-470 | REDACTED:531-554 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:562 — REDACTED:562-582 | REDACTED:559-579 | REDACTED:562-582 | REDACTED:567-587 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:589 — REDACTED:589-608 | REDACTED:586-605 | REDACTED:589-608 | REDACTED:594-613 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:163 — REDACTED:163-186 | REDACTED:149-165 | REDACTED:163-186 | REDACTED:155-178 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:197 — REDACTED:197-207 | REDACTED:169-179 | REDACTED:197-207 | REDACTED:189-199 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:305 — REDACTED:305-319 | REDACTED:233-249 | REDACTED:305-319 | REDACTED:276-290 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×18
  • Duplicated block (19 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/ProductCoupon/ProductCouponModels.cs:35 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/ProductCoupon/ProductCouponModels.cs:35-53 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/ProductCoupon/ProductCouponModels.cs:845-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 (19 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:268 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:268-286 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:837-855 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:147 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:147-165 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Chat/ChatApi.cs:410-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. The matched lines also transfer control out of the body holding them, 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MeetingRoom/MeetingRoomJson.cs:44 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MeetingRoom/MeetingRoomJson.cs:44-62 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MeetingRoom/MeetingRoomJson.cs:98-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:212 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:212-230 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:462-480 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/MedicalInsurance/MedicalInsuranceModels.cs:72 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/MedicalInsurance/MedicalInsuranceModels.cs:72-90 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/MedicalInsurance/MedicalInsuranceModels.cs:198-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.
  • Duplicated block (19 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageContexts/DefaultMpMessageContext.cs:134 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageContexts/DefaultMpMessageContext.cs:134-152 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:117-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:194 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:194-212 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:1026-1044 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:76 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:76-94 | src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:96-114 — before extracting anything, compare `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs` and `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) src/Senparc.Weixin/Senparc.Weixin/Enums.cs:548 — src/Senparc.Weixin/Senparc.Weixin/Enums.cs:548-566 | src/Senparc.Weixin/Senparc.Weixin/Enums.cs:762-780 — both copies are in the same file, so extract the 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) REDACTED:199 — REDACTED:199-217 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs:226-244 — before extracting anything, compare `REDACTED` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (19 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3InfoCollection.cs:74 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3InfoCollection.cs:74-92 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayV3InfoCollection.cs:85-103 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3InfoCollection.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayV3InfoCollection.cs` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/ReturnJson/Apply4SubCurrentReturnJson.cs:92 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/ReturnJson/Apply4SubCurrentReturnJson.cs:92-110 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/ReturnJson/Apply4SubCurrentReturnJson.cs:122-140 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/AccessTokenContainer.cs:397 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/AccessTokenContainer.cs:397-415 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.cs:212-230 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3Util.cs:125 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3Util.cs:125-151 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayV3Util.cs:124-142 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) REDACTED:44 — REDACTED:44-62 | REDACTED:44-62 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) REDACTED:462 — REDACTED:462-480 | REDACTED:433-451 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 454 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:462` 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) REDACTED:462 — REDACTED:462-480 | REDACTED:433-451 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:462` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×18
  • Duplicated block (20 lines × 2) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:203 — src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:203-222 | src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:354-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 `src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:203` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (20 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:98 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:98-117 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:433-452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:482 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:482-501 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:1357-1376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/School/SchoolJson.cs:268 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/School/SchoolJson.cs:268-287 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/School/SchoolJson.cs:347-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:53 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:53-72 | src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:73-92 — before extracting anything, compare `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs` and `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) src/Senparc.Weixin/Senparc.Weixin/Enums.cs:589 — src/Senparc.Weixin/Senparc.Weixin/Enums.cs:589-608 | src/Senparc.Weixin/Senparc.Weixin/Enums.cs:799-818 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:123 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:123-142 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.cs:118-137 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:242 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:242-261 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.cs:203-222 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:242` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingRecordCurrentJson.cs:59 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingRecordCurrentJson.cs:59-81 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingRecordCurrentJson.cs:117-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.
  • Duplicated block (20 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:264 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:264-283 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:306-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 (20 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:465 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:465-484 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:507-526 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:795 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:795-814 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:832-851 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:817` calls `SelectSingleNode` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:853` 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 (20 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:193 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:193-212 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:235-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) REDACTED:482 — REDACTED:482-501 | REDACTED:482-501 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync_Events.cs:96 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync_Events.cs:96-115 | Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler_Events.cs:485-504 — 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 `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync_Events.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.
  • Duplicated block (20 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:57 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:57-76 | Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:50-69 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs` and `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) REDACTED:456 — REDACTED:456-475 | REDACTED:482-501 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 218 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) REDACTED:664 — REDACTED:664-683 | REDACTED:632-651 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×17
  • Duplicated block (17 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:482 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:482-498 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:1046-1062 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:173 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:173-189 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:742-758 — both copies are in the same file, so extract the 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 (17 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:219 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:219-235 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:788-804 — both copies are in the same file, so extract the 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 (17 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:316 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:316-332 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:885-901 — both copies are in the same file, so extract the 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 (17 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs:70 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs:70-86 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/JsonResult/Menu/GetMenuResultFull.cs:107-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/LiveBroadcast/LiveBroadcastRoomJson.cs:79 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/LiveBroadcast/LiveBroadcastRoomJson.cs:79-95 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/LiveBroadcast/LiveBroadcastRoomJson.cs:131-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.
  • Duplicated block (17 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:689 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:689-705 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:732-748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:689` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/ResponseMessageFactory.cs:73 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/ResponseMessageFactory.cs:73-89 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/ResponseMessageFactory.cs:34-50 — 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/ResponseMessageFactory.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) REDACTED:299 — REDACTED:299-315 | REDACTED:231-247 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/RequestMessageFactory.cs:83 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/RequestMessageFactory.cs:83-99 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/RequestMessageFactory.cs:78-94 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/RequestMessageFactory.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/RequestMessageFactory.cs` as WHOLE FILES: 90% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:272 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:272-288 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:329-345 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3CloseOrderRequestData.cs:103 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3CloseOrderRequestData.cs:103-119 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3CloseOrderRequestData.cs:142-158 — both copies are in the same file, so extract the 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 (17 lines × 2) src/Senparc.Weixin.MCP.Server/InvokeWeixinApiHelper.cs:74 — src/Senparc.Weixin.MCP.Server/InvokeWeixinApiHelper.cs:74-90 | src/Senparc.Weixin.MCP.Server/InvokeWeixinApiHelper.cs:111-127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MCP.Server/InvokeWeixinApiHelper.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.
  • Duplicated block (17 lines × 2) REDACTED:38 — REDACTED:38-54 | REDACTED:38-54 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) REDACTED:205 — REDACTED:205-221 | REDACTED:205-221 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 236 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) REDACTED:279 — REDACTED:279-295 | REDACTED:279-295 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) REDACTED:58 — REDACTED:58-74 | REDACTED:58-74 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×17
  • Duplicated block (8 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MerChant/Order/OrderApi.cs:91 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MerChant/Order/OrderApi.cs:91-98 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MerChant/Order/OrderApi.cs:188-195 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:896 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:896-903 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:969-976 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:896` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1461 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1461-1468 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1535-1542 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1461` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:326 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:326-333 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:462-469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:334` calls `SetParameter` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:472` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/QueryPartnershipsRequestData.cs:64 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/QueryPartnershipsRequestData.cs:64-71 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/TerminatePartnershipsRequestData.cs:65-72 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/QueryPartnershipsRequestData.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/TerminatePartnershipsRequestData.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. 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubRequestData.cs:172 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubRequestData.cs:172-179 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/RequestData/EcommerceSubMerchantRequestData.cs:213-261 — 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubRequestData.cs:172` it does not close everything it opens, so those exact lines 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) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:92 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:92-99 | Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:85-92 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs` and `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) REDACTED:179 — REDACTED:179-186 | REDACTED:179-186 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) REDACTED:29 — REDACTED:29-36 | REDACTED:29-36 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) REDACTED:36 — REDACTED:36-43 | REDACTED:29-36 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) REDACTED:202 — REDACTED:202-209 | REDACTED:202-209 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) REDACTED:213 — REDACTED:213-220 | REDACTED:213-220 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) REDACTED:37 — REDACTED:37-44 | REDACTED:24-31 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:81 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:81-88 | Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:74-81 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs` and `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:645 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:645-652 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:293-300 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:81 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:81-88 | Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:74-81 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs` and `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:645 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:645-652 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:293-300 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
X1 · Async correctness · Sync-over-async (deadlock risk) · ×17
  • Sync-over-async (deadlock risk) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/AccessTokenContainer.cs:222 — 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/JsApiTicketContainer.cs:154 — 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Containers/ProviderTokenContainer.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.
  • Sync-over-async (deadlock risk) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:345 — 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) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:356 — 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) src/Senparc.Weixin/Senparc.Weixin/Containers/BaseContainer.cs:522 — 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:162 — 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:141 — 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/OAuthAccessTokenContainer.cs:141 — 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/WxCardApiTicketContainer.cs:110 — 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:292 — 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) src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/AuthorizerContainer.cs:192 — 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) src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/AuthorizerContainer.cs:236 — 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) src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/ComponentContainer.cs:228 — 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) src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/ComponentContainer.cs:275 — 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) src/Senparc.Weixin.Open/Senparc.Weixin.Open/MessageHandlers/ThirdPartyMessageHandler.cs:102 — 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) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.cs:88 — 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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×16
  • Duplicated block (18 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:532 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:532-549 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:1405-1422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:144 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:144-161 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:185-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:144` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin/Senparc.Weixin/Containers/BaseContainer.cs:337 — src/Senparc.Weixin/Senparc.Weixin/Containers/BaseContainer.cs:337-354 | src/Senparc.Weixin/Senparc.Weixin/Containers/BaseContainer.cs:549-566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin/Senparc.Weixin/Containers/BaseContainer.cs:337` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) src/Senparc.Weixin/Senparc.Weixin/Enums.cs:262 — src/Senparc.Weixin/Senparc.Weixin/Enums.cs:262-279 | src/Senparc.Weixin/Senparc.Weixin/Enums.cs:656-673 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisContainerCacheStrategy.cs:176 — src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisContainerCacheStrategy.cs:176-193 | src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisContainerCacheStrategy.cs:177-194 — before extracting anything, compare `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisContainerCacheStrategy.cs` and `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisContainerCacheStrategy.cs` as WHOLE FILES: 98% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundRequestData.cs:190 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundRequestData.cs:190-207 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundRequestData.cs:264-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundRequestData.cs:190` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs:69 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs:69-86 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs:69-86 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 300 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisContainerCacheStrategy.cs:147 — src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisContainerCacheStrategy.cs:147-164 | src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisContainerCacheStrategy.cs:148-165 — before extracting anything, compare `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisContainerCacheStrategy.cs` and `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisContainerCacheStrategy.cs` as WHOLE FILES: 98% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/TenPayUtil.cs:171 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/TenPayUtil.cs:171-188 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3Util.cs:182-199 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/TenPayUtil.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3Util.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/TenPayUtil.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.
  • Duplicated block (18 lines × 2) REDACTED:68 — REDACTED:68-85 | REDACTED:68-85 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) REDACTED:190 — REDACTED:190-207 | REDACTED:190-207 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) REDACTED:63 — REDACTED:63-80 | REDACTED:63-80 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) REDACTED:171 — REDACTED:171-188 | REDACTED:171-188 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 236 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) REDACTED:97 — REDACTED:97-114 | REDACTED:97-114 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) REDACTED:84 — REDACTED:84-101 | REDACTED:128-146 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:84` 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 (18 lines × 2) REDACTED:66 — REDACTED:66-83 | REDACTED:68-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×15
  • Duplicated block (10 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/MarketingApis.Favor.cs:332 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/MarketingApis.Favor.cs:332-341 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/MarketingApis.Favor.cs:384-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/MarketingApis.Favor.cs:332` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3408 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3408-3417 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3434-3443 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3408` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/AuthorizerContainer.cs:374 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/AuthorizerContainer.cs:374-383 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/AuthorizerContainer.cs:704-713 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:123 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:123-132 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:1106-1115 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:1059 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:1059-1068 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:1099-1108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:1059` it begins part-way through the construct above it, so those exact lines 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:840 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:840-849 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/TenPayHttpClient.cs:308-317 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:196 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:196-205 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:195-204 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs` and `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.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 (10 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/ChainBrandProfitsharing/ChainBrandProfitsharingApis.cs:362 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/ChainBrandProfitsharing/ChainBrandProfitsharingApis.cs:362-372 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Security/SecurityEchoApis.cs:84-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.cs:181 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.cs:181-190 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/UnfreezeProfitsharingReturnJson.cs:126-135 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/UnfreezeProfitsharingReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 × 2) REDACTED:220 — REDACTED:220-229 | REDACTED:221-230 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) REDACTED:68 — REDACTED:68-77 | REDACTED:68-77 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 236 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageHandler.cs:44 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageHandler.cs:44-53 | Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageHandler.cs:44-53 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageHandler.cs` and `Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageHandler.cs` as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:42 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:42-51 | Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:35-44 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs` and `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.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 (10 lines × 2) REDACTED:213 — REDACTED:213-222 | REDACTED:213-222 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) REDACTED:616 — REDACTED:616-625 | REDACTED:529-538 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 415 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×15
  • Untrusted text written into markup unescaped REDACTED:110 — `sb.ToString()` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:197 — `"用户已授权,授权Token:" + result` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:219 — `string.Format("<a href=\"{0}\">点击这里</a>。", Url.Action("Index"))` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:221 — `msg` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:269 — `sb.ToString()` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:599 — `t` is text this program did not author, and it is written into a script or style context through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped REDACTED:108 — `sb.ToString()` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:110 — `sb.ToString()` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:197 — `"用户已授权,授权Token:" + result` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:219 — `string.Format("<a href=\"{0}\">点击这里</a>。", Url.Action("Index"))` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:221 — `msg` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:269 — `sb.ToString()` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:599 — `t` is text this program did not author, and it is written into a script or style context through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped REDACTED:146 — `"用户已授权,授权Token:" + result` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:512 — `t` is text this program did not author, and it is written into a script or style context through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×14
  • Duplicated block (11 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/UrlScheme/UrlSchemeApi.cs:51 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/UrlScheme/UrlSchemeApi.cs:51-61 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/UrlScheme/UrlSchemeApi.cs:136-146 — both copies are in the same file, so extract the 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 (11 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/UrlScheme/UrlSchemeApi.cs:82 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/UrlScheme/UrlSchemeApi.cs:82-92 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/UrlScheme/UrlSchemeApi.cs:167-177 — both copies are in the same file, so extract the 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 (11 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:515 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:515-525 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:566-576 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:515` 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:630 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:630-640 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:657-667 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceApi.cs:630` 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) src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:164 — src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:164-174 | src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:164-174 — before extracting anything, compare `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs` and `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs` as WHOLE FILES: 95% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:164` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/PayBank/TenPayV3PayBankRequestData.cs:132 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/PayBank/TenPayV3PayBankRequestData.cs:132-142 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/PayBank/TenPayV3QueryBankRequestData.cs:81-91 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/PayBank/TenPayV3PayBankRequestData.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/PayBank/TenPayV3QueryBankRequestData.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/PayBank/TenPayV3PayBankRequestData.cs:129` calls `Parse` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/PayBank/TenPayV3QueryBankRequestData.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 (11 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/GenerateSchemeApi.cs:60 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/GenerateSchemeApi.cs:60-70 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/SearchApi.cs:60-70 — before extracting anything, compare `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/GenerateSchemeApi.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/SearchApi.cs` as WHOLE FILES: 98% 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 (11 lines × 2) src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:135 — src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:135-145 | src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs:135-145 — before extracting anything, compare `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs` and `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.cs` as WHOLE FILES: 95% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/ContainerCacheStrategy/RedisHashSetContainerCacheStrategy.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 (11 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs:414 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs:414-424 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs:424-434 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 300 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/GenerateSchemeApi.cs:37 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/GenerateSchemeApi.cs:37-47 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/SearchApi.cs:37-47 — before extracting anything, compare `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/GenerateSchemeApi.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/SearchApi.cs` as WHOLE FILES: 98% 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 (11 lines × 2) REDACTED:44 — REDACTED:44-54 | REDACTED:44-54 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) REDACTED:63 — REDACTED:63-73 | REDACTED:63-73 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:668 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:668-678 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:321-331 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:668 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:668-678 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:321-331 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D3 · God Classes · MethodTooLong · ×13
  • MethodTooLong: WorkMessageHandler.OnEventRequestAsync src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:198 — MethodTooLong — OnEventRequestAsync runs 329 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 229 over it, 3.29× 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: DefaultWorkMessageContext.GetRequestEntityMappingResult src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:76 — MethodTooLong — GetRequestEntityMappingResult runs 241 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 141 over it, 2.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WeixinDevSidebarProvider._getHtmlForWebview tools/WeixinDev/src/sidebarProvider.ts:89 — MethodTooLong — _getHtmlForWebview runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DefaultMpMessageContext.GetRequestEntityMappingResult src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageContexts/DefaultMpMessageContext.cs:58 — MethodTooLong — GetRequestEntityMappingResult runs 207 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 107 over it, 2.07× 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: MessageHandler.OnEventRequestAsync src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/Async/MessageHandlerAsync.Event.cs:50 — MethodTooLong — OnEventRequestAsync runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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: MessageHandler.OnEventRequest src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.Event.cs:52 — MethodTooLong — OnEventRequest runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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: EntityHelper.FillEntityWithXml src/Senparc.Weixin.Work/Senparc.Weixin.Work/Helpers/EntityHelper.cs:96 — MethodTooLong — FillEntityWithXml runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× 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: TenPayApiRequest.RequestMultipartCoreAsync src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:370 — MethodTooLong — RequestMultipartCoreAsync runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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: DefaultWxOpenMessageContext.GetRequestEntityMappingResult src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageContexts/DefaultWxOpenMessageContext.cs:39 — MethodTooLong — GetRequestEntityMappingResult runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: CommonApi.GetMenuFromJsonResult src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:223 — MethodTooLong — GetMenuFromJsonResult runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× 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: WxOpenMessageHandler.OnEventRequest src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.Event.cs:81 — MethodTooLong — OnEventRequest 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: WxOpenMessageHandler.OnEventRequestAsync src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.Event.cs:499 — MethodTooLong — OnEventRequestAsync 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: RequestMessageFactory.GetRequestEntity src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs:59 — MethodTooLong — GetRequestEntity 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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×13
  • Duplicated block (15 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1132 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1132-1146 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3299-3313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Response/WorkResponseMessageBase.cs:61 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Response/WorkResponseMessageBase.cs:61-75 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:347-361 — 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 `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Response/WorkResponseMessageBase.cs:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:361 — src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:361-375 | src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:414-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 `src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:361` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs:163 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs:163-177 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs:520-534 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs:70 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs:70-84 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:72-86 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (15 lines × 2) src/Senparc.Weixin/Senparc.Weixin/Enums.cs:617 — src/Senparc.Weixin/Senparc.Weixin/Enums.cs:617-631 | src/Senparc.Weixin/Senparc.Weixin/Enums.cs:849-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 (15 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundRequestData.cs:163 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundRequestData.cs:163-177 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundRequestData.cs:234-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs:69 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs:69-83 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponsReturnJson.cs:127-141 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponsReturnJson.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (15 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:70 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:70-84 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:71-85 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (15 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:370 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:370-384 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.cs:275-289 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.cs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:370` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) REDACTED:399 — REDACTED:399-413 | REDACTED:370-384 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 454 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:399` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) REDACTED:399 — REDACTED:399-413 | REDACTED:370-384 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:399` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) REDACTED:70 — REDACTED:70-84 | REDACTED:63-77 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 96% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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.
D10 · Test Quality · Test cannot fail · ×12
  • Test cannot fail: GetConversationRecordsTest src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/AdvancedAPIs/DataIntelligence/DataIntelligenceTest.cs:41 — This test's act runs inside `catch (Exception)` at line 62 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. Adding an assertion inside that region does not fix it: the assertion throws, and the same catch swallows it exactly like the exception it replaced. 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.
  • Test cannot fail: GetConversationRecordsAsyncTest src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/AdvancedAPIs/DataIntelligence/DataIntelligenceTest.cs:69 — This test's act runs inside `catch (Exception)` at line 84 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. Adding an assertion inside that region does not fix it: the assertion throws, and the same catch swallows it exactly like the exception it replaced. 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.
  • Test cannot fail: GetConversationRecordsWithRequestObjectTest src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/AdvancedAPIs/DataIntelligence/DataIntelligenceTest.cs:90 — This test's act runs inside `catch (Exception)` at line 110 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. Adding an assertion inside that region does not fix it: the assertion throws, and the same catch swallows it exactly like the exception it replaced. 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.
  • Test cannot fail: LimitValidationTest src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/AdvancedAPIs/DataIntelligence/DataIntelligenceTest.cs:116 — This test's act runs inside `catch (Exception)` at line 132 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. Adding an assertion inside that region does not fix it: the assertion throws, and the same catch swallows it exactly like the exception it replaced. 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.
  • Test cannot fail: GetMessageStatisticsTest src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/AdvancedAPIs/DataIntelligence/DataIntelligenceTest.cs:138 — This test's act runs inside `catch (Exception)` at line 152 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. Adding an assertion inside that region does not fix it: the assertion throws, and the same catch swallows it exactly like the exception it replaced. 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.
  • Test cannot fail: GetMessageStatisticsAsyncTest src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/AdvancedAPIs/DataIntelligence/DataIntelligenceTest.cs:158 — This test's act runs inside `catch (Exception)` at line 178 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. Adding an assertion inside that region does not fix it: the assertion throws, and the same catch swallows it exactly like the exception it replaced. 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.
  • Test cannot fail: ConcurrentTesting src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/AsyncTest.cs:62 — This test's act runs inside `catch (Exception)` at line 103 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. Adding an assertion inside that region does not fix it: the assertion throws, and the same catch swallows it exactly like the exception it replaced. 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.
  • Test cannot fail: TestMaxLegth src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/Custom/CustomTest.cs:123 — This test's act runs inside `catch (Exception)` at line 138 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.
  • Test cannot fail: GetUserInfoTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/CommonAPIs/CommonApiTest.cs:265 — This test's act runs inside `catch (Exception)` at line 274 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.
  • Test cannot fail: ContainerTest src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/Containers/AccessTokenContainerTest.cs:45 — This test's act runs inside `RunMutipleCache` at src/Senparc.Weixin/Senparc.WeixinTests/MutipleCacheTestWapper.cs:65, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 7 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.
  • Test cannot fail: NonPostRequestDoesNotReadBodyTest src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3.Test/HttpHandlers/TenPayNotifyHandlerTests.cs:189 — This test's act runs inside `catch (Exception)` at line 215 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.
  • Test cannot fail: SendThrowTest src/Senparc.Weixin/Senparc.WeixinTests/CommonApis/CommonJsonSendTests.cs:9 — This test's act runs inside `catch (Exception)` at line 22 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×12
  • Duplicated block (7 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Media/MediaApi.cs:197 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Media/MediaApi.cs:197-203 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Media/MediaApi.cs:132-138 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayNotifyHandler.cs:271 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayNotifyHandler.cs:271-277 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayNotifyHandler.cs:303-309 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MerChant/Picture/PictureApi.cs:57 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MerChant/Picture/PictureApi.cs:57-63 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MerChant/Picture/PictureApi.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. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MerChant/Picture/PictureApi.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.
  • Duplicated block (7 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:349 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:349-355 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:366-372 — both copies are in the same file, so extract the 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `SendTextCardData` in one and `SendMiniNoticeData` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoiceResultJson.cs:108 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoiceResultJson.cs:108-114 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/Request/Event/RequestMessageEvent_Submit_Invoice_Title.cs:48-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:343 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:343-349 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.cs:248-254 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.cs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequestData.cs:310 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequestData.cs:310-316 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequsetData.cs:249-255 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequestData.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequsetData.cs` as WHOLE FILES: this scan already matched 3 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. 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) Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Global.asax.cs:215 — Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Global.asax.cs:215-221 | Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Global.asax.cs:238-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:165 — REDACTED:165-171 | REDACTED:165-171 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) REDACTED:49 — REDACTED:49-55 | REDACTED:49-55 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:635 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:635-641 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:283-289 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:635 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:635-641 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:283-289 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×10
  • Focus outline removed in CSS without a :focus replacement Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Content/Site.css:19 — `a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Content/Site.css:143 — `.site-title a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Content/reset.css:32 — `button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Content/themes/base/jquery-ui.css:10 — `.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Content/themes/base/jquery.ui.core.css:15 — `.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/Site.css:19 — `a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/Site.css:143 — `.site-title a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/reset.css:32 — `button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/themes/base/jquery-ui.css:10 — `.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Samples/All/Senparc.Weixin.Sample.Shared/wwwroot/Content/themes/base/jquery.ui.core.css:15 — `.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×10
  • Duplicated block (16 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MeetingRoom/MeetingRoomJson.cs:50 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MeetingRoom/MeetingRoomJson.cs:50-65 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MeetingRoom/MeetingRoomJson.cs:145-160 — both copies are in the same file, so extract the 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 (16 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingManagementJson.cs:63 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingManagementJson.cs:63-78 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingManagementJson.cs:89-104 — both copies are in the same file, so extract the 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 (16 lines × 2) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:156 — src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:156-171 | src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:306-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:156` 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1328 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1328-1343 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3491-3506 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1328` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:263 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:263-278 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.cs:223-238 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:263` 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:201 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:201-216 | src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:221-236 — before extracting anything, compare `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs` and `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) REDACTED:158 — REDACTED:158-173 | REDACTED:1007-1022 — both copies are in the same file, so extract the 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 (16 lines × 2) REDACTED:253 — REDACTED:253-268 | REDACTED:349-364 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:253` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) REDACTED:189 — REDACTED:189-204 | REDACTED:1058-1073 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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:189` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) REDACTED:211 — REDACTED:211-226 | REDACTED:211-226 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×10
  • Duplicated block (9 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3689 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3689-3697 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3770-3778 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3689` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:404 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:404-412 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:395-403 — 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:404` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `NonTaxDownloadBillRequest` in one and `DeliveryProviderGetBillRequest` 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:420 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:420-428 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:411-419 — 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:420` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `NonTaxDownloadBillRequest` in one and `DeliveryProviderGetBillRequest` 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) REDACTED:58 — REDACTED:58-66 | REDACTED:101-109 — both copies are in the same file, so extract the 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Helpers/JSSDK/JSSDKHelper.cs:108 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Helpers/JSSDK/JSSDKHelper.cs:108-116 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/Helpers/JSSDK/JSSDKHelper.cs:137-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/Helpers/JSSDK/JSSDKHelper.cs:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:403 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:403-411 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:428-436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:403` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:450 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:450-458 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:473-481 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:450` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:118 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:118-127 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:151-159 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs` as WHOLE FILES: this scan already matched 5 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:118` it does not close everything it opens, so those 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) REDACTED:46 — REDACTED:46-54 | REDACTED:46-54 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 236 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) REDACTED:58 — REDACTED:58-66 | REDACTED:48-56 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 454 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×8
  • ClassTooLong: CardApi src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs — ClassTooLong — 1521 significant lines (blank, comment-only and punctuation-only lines excluded), 159 methods. The bar is 400 significant lines; this is 1121 over it, 3.80× the bar. Its members are declarations rather than behaviour over shared data — the type holds no instance state — so there is nothing to group them by and nothing to delegate. To reduce it, split it by area instead: move each cohesive group of declarations onto its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: ShakeAroundApi src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs — ClassTooLong — 687 significant lines (blank, comment-only and punctuation-only lines excluded), 70 methods. The bar is 400 significant lines; this is 287 over it, 1.72× the bar. Its members are declarations rather than behaviour over shared data — the type holds no instance state — so there is nothing to group them by and nothing to delegate. To reduce it, split it by area instead: move each cohesive group of declarations onto its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: MassApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs — ClassTooLong — 485 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods, declared across 2 files: Mass/MassApi.cs (30), Mass/MassApi.Statistics.cs (2). The bar is 400 significant lines; this is 85 over it, 1.21× the bar. Its members are declarations rather than behaviour over shared data — the type holds no instance state — so there is nothing to group them by and nothing to delegate. To reduce it, split it by area instead: move each cohesive group of declarations onto its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: GroupMessageApi src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs — ClassTooLong — 468 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 68 over it, 1.17× the bar. Its members are declarations rather than behaviour over shared data — the type holds no instance state — so there is nothing to group them by and nothing to delegate. To reduce it, split it by area instead: move each cohesive group of declarations onto its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: CustomApi src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs — ClassTooLong — 441 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 41 over it, 1.10× 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: TenPayApiRequest src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs — ClassTooLong — 438 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 38 over it, 1.10× 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: MailListApi src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MailList/MailListApi.cs — ClassTooLong — 427 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods, declared across 3 files: MailList/MailListApi.cs (50), MailList/MailListMemberAuthorizationApi.cs (8), MailList/MailListCurrentApi.cs (4). The bar is 400 significant lines; this is 27 over it, 1.07× the bar. Its members are declarations rather than behaviour over shared data — the type holds no instance state — so there is nothing to group them by and nothing to delegate. To reduce it, split it by area instead: move each cohesive group of declarations onto its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: InvoiceApi src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceApi.cs — ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 400 significant lines; this is 2 over it, 1.01× the bar. Its members are declarations rather than behaviour over shared data — the type holds no instance state — so there is nothing to group them by and nothing to delegate. To reduce it, split it by area instead: move each cohesive group of declarations onto its own smaller type, so no one type has to be read whole to change one of them.
D3 · God Classes · FileTooLong · ×8
  • FileTooLong: Card/CardAPI.cs src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs — FileTooLong — 1534 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1034 over it, 3.07× 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: Senparc.Weixin/Enums.cs src/Senparc.Weixin/Senparc.Weixin/Enums.cs — FileTooLong — 1244 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 744 over it, 2.49× 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: Async/WorkMessageHandler.Async.cs src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs — FileTooLong — 718 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 218 over it, 1.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ShakeAround/ShakeAroundApi.cs src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs — FileTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 199 over it, 1.40× 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: WxApp/WxAppApi.cs src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs — FileTooLong — 627 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 127 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Universal/TenPayV3.cs src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs — FileTooLong — 556 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 56 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: External/ExternalApi.cs src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalApi.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: ComponentAPIs/ComponentApi.cs src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs — FileTooLong — 519 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 19 over it, 1.04× 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×8
  • Duplicated block (14 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:997 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:997-1010 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:2000-2013 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3MicroPayRequestData.cs:151 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3MicroPayRequestData.cs:151-164 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundQueryRequestData.cs:135-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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 × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:181 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:181-194 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs:151-164 — 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 `src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:181` it does not close everything it opens, so those 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/PayBusifavorReceiptsReturnJson.cs:64 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/PayBusifavorReceiptsReturnJson.cs:64-77 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorPayReceiptsReturnJson.cs:64-77 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/PayBusifavorReceiptsReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorPayReceiptsReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3CloseOrderRequestData.cs:147 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3CloseOrderRequestData.cs:147-161 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3RefundRequestData.cs:251-264 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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 × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3Util.cs:222 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3Util.cs:222-235 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayV3Util.cs:208-221 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) REDACTED:75 — REDACTED:75-88 | REDACTED:75-88 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) REDACTED:33 — REDACTED:33-46 | REDACTED:33-46 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×8
  • Duplicated block (13 lines × 3) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:722 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:722-734 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:770-782 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:1000-1012 — 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:722` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:75 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:75-87 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:76-88 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/SyncPayServiceOrderReturnJson.cs:77-89 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (13 lines × 3) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:342 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:342-354 | Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Global.asax.cs:207-219 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:328-340 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 433 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:342` 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, `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:341` calls `Close` and `Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Global.asax.cs:206` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 3) REDACTED:84 — REDACTED:84-96 | REDACTED:84-96 | REDACTED:76-88 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 3) REDACTED:163 — REDACTED:163-175 | REDACTED:163-175 | REDACTED:154-166 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 3) REDACTED:375 — REDACTED:375-387 | REDACTED:279-291 | REDACTED:375-387 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:375` it does not close everything it opens, so those 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) REDACTED:257 — REDACTED:257-269 | REDACTED:239-251 | REDACTED:257-269 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:257` 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 (13 lines × 3) REDACTED:121 — REDACTED:121-133 | REDACTED:121-133 | REDACTED:107-119 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:121` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×8
  • Duplicated block (12 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/Async/MessageHandlerAsync.cs:69 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/Async/MessageHandlerAsync.cs:69-80 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.cs:288-299 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) src/Senparc.Weixin.MP.Middleware/MessageHandlers/Middleware/MpMessageHandlerMiddleware.cs:108 — src/Senparc.Weixin.MP.Middleware/MessageHandlers/Middleware/MpMessageHandlerMiddleware.cs:108-119 | src/Senparc.Weixin.WxOpen.Middleware/MessageHandlers/Middleware/WxOpenMessageHandlerMiddleware.cs:109-120 — before extracting anything, compare `src/Senparc.Weixin.MP.Middleware/MessageHandlers/Middleware/MpMessageHandlerMiddleware.cs` and `src/Senparc.Weixin.WxOpen.Middleware/MessageHandlers/Middleware/WxOpenMessageHandlerMiddleware.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 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:591 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:591-602 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:636-647 — both copies are in the same file, so extract the 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `RefundRequsetData` in one and `RefundRequestData` 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivitiesReturnJson.cs:235 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivitiesReturnJson.cs:235-246 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivityReturnJson.cs:194-205 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivitiesReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivityReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (12 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:651 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:651-662 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:669-680 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `amount` to `long` in one and `int` 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:70 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:70-81 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs:70-81 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (12 lines × 2) REDACTED:221 — REDACTED:221-232 | REDACTED:221-232 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) REDACTED:123 — REDACTED:123-134 | REDACTED:182-193 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×8
  • Duplicated block (10 lines × 3) REDACTED:125 — REDACTED:125-134 | REDACTED:130-139 | REDACTED:125-134 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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 (10 lines × 3) REDACTED:741 — REDACTED:741-750 | REDACTED:709-718 | REDACTED:693-702 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:741` it does not close everything it opens, so those 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:706` calls `FundflowBillQueryRequestData` and `REDACTED:752` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) REDACTED:805 — REDACTED:805-814 | REDACTED:805-814 | REDACTED:809-818 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) REDACTED:66 — REDACTED:66-75 | REDACTED:66-75 | REDACTED:58-67 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) REDACTED:198 — REDACTED:198-207 | REDACTED:198-207 | REDACTED:190-199 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) REDACTED:68 — REDACTED:68-77 | REDACTED:45-54 | REDACTED:68-77 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) REDACTED:482 — REDACTED:482-491 | REDACTED:456-465 | REDACTED:482-491 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) REDACTED:616 — REDACTED:616-625 | REDACTED:616-625 | REDACTED:529-538 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×7
  • Duplicated block (27 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:237 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:237-263 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:1241-1267 — both copies are in the same file, so extract the 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 (27 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/TenPayUtil.cs:82 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/TenPayUtil.cs:82-108 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3Util.cs:90-116 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/TenPayUtil.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3Util.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:162 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:162-189 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:700-726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:210 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:210-238 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:748-774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:439 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:439-465 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:978-1004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:439` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) REDACTED:160 — REDACTED:160-186 | REDACTED:160-186 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/ProductModel.cs:20 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/ProductModel.cs:20-46 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/ProductModel.cs:20-46 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/ProductModel.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/ProductModel.cs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×7
  • Duplicated block (24 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:426 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:426-449 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:993-1016 — both copies are in the same file, so extract the 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 (24 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs:181 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs:181-204 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/Verifier/SHA256WithRSAVerifier.cs:34-57 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/Verifier/SHA256WithRSAVerifier.cs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:97 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:97-120 | src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:117-140 — before extracting anything, compare `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs` and `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) REDACTED:170 — REDACTED:170-193 | REDACTED:161-184 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 454 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:170` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (24 lines × 2) REDACTED:104 — REDACTED:104-127 | REDACTED:111-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. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:104` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) REDACTED:170 — REDACTED:170-193 | REDACTED:161-184 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:170` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (24 lines × 2) REDACTED:49 — REDACTED:49-72 | REDACTED:49-72 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×7
  • Duplicated block (21 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:950 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:950-970 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:1953-1973 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:904 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:904-924 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:1779-1799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Media/MediaApi.cs:349 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Media/MediaApi.cs:349-369 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Media/MediaApi.cs:901-921 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Media/MediaApi.cs:349` it does not close everything it opens, so those exact lines 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) REDACTED:89 — REDACTED:89-109 | REDACTED:89-109 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:56 — Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:56-76 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Utilities/QrCodeHelper.cs:56-76 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs` and `Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Utilities/QrCodeHelper.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) REDACTED:164 — REDACTED:164-184 | REDACTED:164-184 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:493 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:493-513 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:479-499 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 433 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×7
  • Duplicated block (14 lines × 3) src/Senparc.Weixin.MP/Senparc.Weixin.MP/ResponseMessageFactory.cs:77 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/ResponseMessageFactory.cs:77-90 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Response/WorkResponseMessageBase.cs:137-150 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/ResponseMessageFactory.cs:38-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/ResponseMessageFactory.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) REDACTED:111 — REDACTED:111-124 | REDACTED:91-104 | REDACTED:111-124 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 3) REDACTED:313 — REDACTED:313-326 | REDACTED:313-326 | REDACTED:302-315 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:313` 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 × 3) REDACTED:306 — REDACTED:306-319 | REDACTED:306-319 | REDACTED:277-290 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 3) REDACTED:150 — REDACTED:150-163 | REDACTED:166-179 | REDACTED:158-171 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) REDACTED:65 — REDACTED:65-78 | REDACTED:72-85 | REDACTED:65-78 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) REDACTED:588 — REDACTED:588-601 | REDACTED:556-569 | REDACTED:529-542 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:588` 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.
S1 · Cryptographic Hygiene · Weak hash algorithm · ×7
  • Weak hash algorithm REDACTED:353 — 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.
  • Weak hash algorithm src/Senparc.Weixin.MP/Senparc.Weixin.MP/CheckSignature.cs:107 — 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.
  • Weak hash algorithm src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPayDownloadHelper.cs:133 — 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.
  • Weak hash algorithm src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPayDownloadHelper.cs:135 — 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.
  • Weak hash algorithm REDACTED:355 — 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.
  • Weak hash algorithm REDACTED:285 — 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.
  • Weak hash algorithm REDACTED:287 — 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.
S1 · Cryptographic Hygiene · Weak cipher · ×7
  • Weak cipher src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:126 — DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes.
  • Weak cipher src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:158 — DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes.
  • Weak cipher src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:233 — DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes.
  • Weak cipher src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:132 — DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes.
  • Weak cipher src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:146 — DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes.
  • Weak cipher src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:178 — DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes.
  • Weak cipher src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:253 — DES / 3DES / RijndaelManaged-bare is deprecated or broken. Use AES-GCM via `Aes.Create()` with explicit key/iv sizes.
X3 · Exception handling · Swallowed exception (empty catch) · ×7
  • Swallowed exception (empty catch) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MsgAudit/MsgAuditFinanceClient.cs:360 — 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) src/Senparc.Weixin/Senparc.Weixin/Trace/WeixinTrace.cs:151 — 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) src/Senparc.Weixin/Senparc.Weixin/Trace/WeixinTrace.cs:183 — 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) src/Senparc.WebSocket/src/Senparc.WebSocket/Senparc.WebSocket/Routes/WebSocketHandler/WebSocketHandler_Common.cs:106 — 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) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:582 — 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) Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:230 — 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:96 — 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×7
  • Swallowed exception (caught, then discarded) src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:170 — `catch (Exception)` 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:208 — `catch (WeixinException)` 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs:214 — `catch (Exception)` 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Result/TenPayV3Results.cs:189 — `catch (System.Exception)` 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) Samples/All/Senparc.Weixin.Sample.CommonService/TemplateMessage/WeixinTemplate_ExceptionAlert.cs:84 — `catch (Exception)` 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) tools/Senparc.Weixin.CLI/WorkspaceServices.cs:215 — `catch (UnauthorizedAccessException)` 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) tools/Senparc.Weixin.CLI/WorkspaceServices.cs:345 — `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.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (6 members, 50+ identical tokens) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:218 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:218-226 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:236-245 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:255-264 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:274-283 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:293-302 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:312-321 — 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) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:69 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:69-96 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:156-183 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:319-346 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:406-433 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/ModifyDomain/ModifyDomainApi.cs:71-96 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/ModifyDomain/ModifyDomainApi.cs:122-147 — 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) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:110 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:110-132 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:211-233 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:360-382 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:461-483 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/SetWebViewDomain/SetWebViewDomainApi.cs:59-81 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/SetWebViewDomain/SetWebViewDomainApi.cs:100-122 — 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3UnifiedorderRequestData.cs:335 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3UnifiedorderRequestData.cs:335-407 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:156-200 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:303-341 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:440-476 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:550-585 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:671-710 — 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:290 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:290-302 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:331-342 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:581-592 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:605-616 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:630-641 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1063-1075 — 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) REDACTED:134 — REDACTED:134-153 | REDACTED:977-996 | REDACTED:134-153 | REDACTED:977-996 | REDACTED:981-1000 | REDACTED:125-144 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×6
  • Duplicated block (38 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudRun/CloudRunJsonResults.cs:420 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudRun/CloudRunJsonResults.cs:420-457 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudRun/CloudRunJsonResults.cs:641-678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (38 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/WxaJson/GetAppealRecordsJsonResult.cs:62 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/WxaJson/GetAppealRecordsJsonResult.cs:62-99 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Entities/Request/Event/RequestMessageEvent_AppealRecord.cs:60-97 — 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 (38 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:550 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:550-587 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:1245-1282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:550` it does not close everything it opens, so those 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 (38 lines × 2) REDACTED:119 — REDACTED:119-156 | REDACTED:119-156 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (38 lines × 2) REDACTED:162 — REDACTED:162-199 | REDACTED:162-199 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (38 lines × 2) REDACTED:440 — REDACTED:440-477 | REDACTED:440-477 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×6
  • Duplicated block (23 lines × 2) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:243 — src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:243-265 | src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:394-416 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:243` it begins part-way through the construct above it, so those 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) src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:650 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:650-672 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:1347-1369 — both copies are in the same file, so extract the 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 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/WiFi/WiFiApi.cs:341 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/WiFi/WiFiApi.cs:341-363 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/WiFi/WiFiApi.cs:845-867 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/WiFi/WiFiApi.cs:341` it does not close everything it opens, so those exact lines 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 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/FundApp/FundAppAuthorizationModels.cs:172 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/FundApp/FundAppAuthorizationModels.cs:172-194 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/FundApp/FundAppAuthorizationNotifyModels.cs:87-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 (23 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/Response/ResponseMessageNews.cs:47 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/Response/ResponseMessageNews.cs:47-70 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Response/ResponseMessageNews.cs:24-46 — 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/Response/ResponseMessageNews.cs:47` 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) REDACTED:41 — REDACTED:41-63 | REDACTED:41-63 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×6
  • Outbound HTTP without resilience REDACTED:101 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience REDACTED:82 — `new HttpClient(handler)` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience REDACTED:128 — `new HttpClient(handler)` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Register.cs:56 — `services.AddHttpClient()` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:80 — `new HttpClient(new HttpClientHandler { UseCookies = false })` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience src/Senparc.Weixin/Senparc.Weixin/RegisterServices/SenparcWeixinRegisterServiceExtension.cs:236 — `services.AddHttpClient(certName)` registers an outbound HTTP client with no resilience handler, retry policy or timeout of its own in its builder chain. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×5
  • Duplicated block (44 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/OneCode/OneCodeJson.cs:177 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/OneCode/OneCodeJson.cs:177-220 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/OneCode/OneCodeJson.cs:269-312 — both copies are in the same file, so extract the 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 (44 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/JsonResult/AddOrderJsonResult.cs:11 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/JsonResult/AddOrderJsonResult.cs:11-54 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/JsonResult/ReOrderJsonResult.cs:11-54 — before extracting anything, compare `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/JsonResult/AddOrderJsonResult.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/JsonResult/ReOrderJsonResult.cs` as WHOLE FILES: 98% 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 (44 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/ReturnJson/EcommerceAccountFundsReturnJson.cs:143 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/ReturnJson/EcommerceAccountFundsReturnJson.cs:143-186 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/ReturnJson/EcommerceAccountFundsReturnJson.cs:271-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (44 lines × 2) REDACTED:164 — REDACTED:164-207 | REDACTED:164-207 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (44 lines × 2) REDACTED:482 — REDACTED:482-525 | REDACTED:482-525 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×5
  • Duplicated block (42 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:156 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:156-197 | src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:176-217 — before extracting anything, compare `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs` and `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (42 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:118 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:118-159 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:117-158 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs` and `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (42 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequestData.cs:321 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequestData.cs:321-362 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequsetData.cs:260-301 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequestData.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequsetData.cs` as WHOLE FILES: this scan already matched 3 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.
  • Duplicated block (42 lines × 2) REDACTED:114 — REDACTED:114-155 | REDACTED:114-155 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (42 lines × 2) REDACTED:229 — REDACTED:229-270 | REDACTED:229-270 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 236 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×5
  • Duplicated block (26 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:290 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:290-315 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:333-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:290` 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 (26 lines × 2) REDACTED:268 — REDACTED:268-293 | REDACTED:158-183 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:268` it begins part-way through the construct above it, so those 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 (26 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:231 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:231-256 | src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:251-276 — before extracting anything, compare `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs` and `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:413 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:413-438 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:1108-1133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:413` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs:180 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs:180-205 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:136-161 — 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs:180` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×5
  • Duplicated block (28 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:902 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:902-929 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:1905-1932 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundApi.cs:902` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateResultJson.cs:169 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateResultJson.cs:169-196 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateResultJson.cs:234-261 — both copies are in the same file, so extract the 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 (28 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentJson/GetPrivacySettingResult.cs:72 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentJson/GetPrivacySettingResult.cs:72-99 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/RequestData/SetPrivacySettingData.cs:36-63 — 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 (28 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:111 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:111-138 | Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:104-131 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs` and `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (28 lines × 2) REDACTED:110 — REDACTED:110-137 | REDACTED:110-137 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×5
  • Duplicated block (9 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:282 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:282-290 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/RequestHandler.cs:317-325 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:339-347 — `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/RequestHandler.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:282` it begins part-way through the construct above it, so those 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 (9 lines × 3) src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:253 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:253-261 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/MessageHandlers/ThirdPartyMessageHandler.cs:78-86 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.cs:214-222 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:253` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:259 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:259-267 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:206-214 | src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:279-287 — before extracting anything, compare `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs` and `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 3) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/AnalysisVD.cs:10 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/AnalysisVD.cs:10-18 | Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Models/VD/AnalysisVD.cs:11-19 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/AnalysisVD.cs:10-18 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/AnalysisVD.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/AnalysisVD.cs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/AnalysisVD.cs:10` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) REDACTED:80 — REDACTED:80-88 | REDACTED:80-88 | REDACTED:81-89 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×5
  • Duplicated block (10 lines × 4) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:81 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:81-90 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:78-87 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:79-88 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/SyncPayServiceOrderReturnJson.cs:80-89 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (10 lines × 4) REDACTED:590 — REDACTED:590-599 | REDACTED:587-596 | REDACTED:590-599 | REDACTED:595-604 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 4) REDACTED:863 — REDACTED:863-872 | REDACTED:816-825 | REDACTED:863-872 | REDACTED:867-876 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 4) REDACTED:66 — REDACTED:66-75 | REDACTED:46-55 | REDACTED:66-75 | REDACTED:58-67 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 4) REDACTED:172 — REDACTED:172-181 | REDACTED:156-165 | REDACTED:172-181 | REDACTED:164-173 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:172` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×5
  • Duplicated block (9 lines × 4) REDACTED:78 — REDACTED:78-87 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:161-170 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:261-269 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:287-295 — before extracting anything, compare `REDACTED` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.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 `REDACTED: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. 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/NotifyJson/PayNotifyJson.cs:237 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/NotifyJson/PayNotifyJson.cs:237-245 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/RequestData/PayParkingRequestData.cs:209-217 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs:235-243 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs:235-243 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 300 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 × 4) REDACTED:563 — REDACTED:563-571 | REDACTED:560-568 | REDACTED:563-571 | REDACTED:568-576 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/HomeVD.cs:20 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/HomeVD.cs:20-28 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/HomeVD.cs:20-28 | Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Models/VD/HomeVD.cs:20-28 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Models/VD/HomeVD.cs:20-28 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/HomeVD.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/HomeVD.cs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/HomeVD.cs:20` it does not close everything it opens, so those exact lines 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) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/HomeVD.cs:36 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/HomeVD.cs:36-44 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/HomeVD.cs:36-44 | Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Models/VD/HomeVD.cs:36-44 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Models/VD/HomeVD.cs:36-44 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/HomeVD.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/HomeVD.cs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×5
  • Duplicated block (5 lines × 4) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:896 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:896-900 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:969-973 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1461-1465 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1535-1539 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:896` it does not close everything it opens, so those exact lines 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) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/RedPacketCover/RedPacketCoverApi.cs:66 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/RedPacketCover/RedPacketCoverApi.cs:66-70 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/ServiceMarket/ServiceMarketApi.cs:85-89 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Student/StudentApi.cs:66-70 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/TransactionGuarantee/TransactionGuaranteeApi.cs:519-525 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `RedPacketCoverUrlRequest` in one and `ServiceMarketRetrieveRequest` 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 × 4) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/RedPacketCover/RedPacketCoverApi.cs:74 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/RedPacketCover/RedPacketCoverApi.cs:74-78 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/ServiceMarket/ServiceMarketApi.cs:93-97 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Student/StudentApi.cs:74-78 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/TransactionGuarantee/TransactionGuaranteeApi.cs:529-535 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `RedPacketCoverUrlRequest` in one and `ServiceMarketRetrieveRequest` 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 × 4) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/RedPacketCover/RedPacketCoverApi.cs:66 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/RedPacketCover/RedPacketCoverApi.cs:66-70 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/ServiceMarket/ServiceMarketApi.cs:85-89 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Student/StudentApi.cs:66-70 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/TransactionGuarantee/TransactionGuaranteeApi.cs:519-525 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `RedPacketCoverUrlRequest` in one and `ServiceMarketRetrieveRequest` 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 × 4) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/RedPacketCover/RedPacketCoverApi.cs:74 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/RedPacketCover/RedPacketCoverApi.cs:74-78 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/ServiceMarket/ServiceMarketApi.cs:93-97 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Student/StudentApi.cs:74-78 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/TransactionGuarantee/TransactionGuaranteeApi.cs:529-535 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `RedPacketCoverUrlRequest` in one and `ServiceMarketRetrieveRequest` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×5
  • Duplicated block (8 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubRequestData.cs:158 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubRequestData.cs:158-165 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Subject/Entities/RequestData/Apply4SubjectRequestData.cs:81-88 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/RequestData/EcommerceSubMerchantRequestData.cs:158-206 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubRequestData.cs:158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) REDACTED:170 — REDACTED:170-177 | REDACTED:198-205 | REDACTED:190-197 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:170` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) REDACTED:107 — REDACTED:107-114 | REDACTED:114-121 | REDACTED:107-114 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 3) REDACTED:145 — REDACTED:145-152 | REDACTED:152-159 | REDACTED:145-152 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 3) REDACTED:597 — REDACTED:597-604 | REDACTED:597-604 | REDACTED:510-517 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×5
  • Duplicated block (7–8 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:415 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:415-421 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1181-1188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:415` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:466 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:466-473 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1235-1241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:466` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:650 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:650-657 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1254-1260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:650` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:780 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:780-787 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1353-1359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:780` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1040 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1040-1047 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1605-1611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1040` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×5
  • Duplicated block (18 lines × 3) REDACTED:45 — REDACTED:45-62 | REDACTED:52-69 | REDACTED:45-62 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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 (18 lines × 3) REDACTED:140 — REDACTED:140-157 | REDACTED:125-142 | REDACTED:140-157 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:140` it does not close everything it opens, so those 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 `postModel` to `Senparc.Weixin.MP.Entities.Request.PostModel` in one and `Entities.Request.PostModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (18 lines × 3) REDACTED:466 — REDACTED:466-483 | REDACTED:466-483 | REDACTED:437-454 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:466` 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) REDACTED:239 — REDACTED:239-256 | REDACTED:221-238 | REDACTED:239-256 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 3) REDACTED:79 — REDACTED:79-96 | REDACTED:150-167 | REDACTED:193-212 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:193` calls `ToString`, `BuildRandomStr` and `REDACTED:79` 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (63 lines × 2) · ×4
  • Duplicated block (63 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/QrCode/QrCodeApi.cs:95 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/QrCode/QrCodeApi.cs:95-157 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/QrCode/QrCodeApi.cs:234-296 — both copies are in the same file, so extract the 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 (63 lines × 2) REDACTED:92 — REDACTED:92-154 | REDACTED:92-154 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (63 lines × 2) REDACTED:207 — REDACTED:207-269 | REDACTED:207-269 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (63 lines × 2) REDACTED:71 — REDACTED:71-133 | REDACTED:71-133 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×4
  • Duplicated block (30 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:452 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:452-481 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:2691-2720 — both copies are in the same file, so extract the 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 (30 lines × 2) REDACTED:120 — REDACTED:120-149 | REDACTED:99-128 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:120` it does not close everything it opens, so those 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 (30 lines × 2) REDACTED:290 — REDACTED:290-319 | REDACTED:290-319 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 561 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (30 lines × 2) REDACTED:89 — REDACTED:89-118 | REDACTED:89-118 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×4
  • Duplicated block (31 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalJson/GroupChat_GetJoinWayResult.cs:50 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalJson/GroupChat_GetJoinWayResult.cs:50-80 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalJson/GroupChat_UpdateJoinWayRequest.cs:41-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 (31 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateData.cs:178 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateData.cs:178-211 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/BaseCardDetails.cs:158-188 — 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 (31 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryJson/DeliveryProviderJson.cs:360 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryJson/DeliveryProviderJson.cs:360-390 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressProviderJson.cs:146-176 — 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 (31 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:595 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:595-625 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:243-273 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×4
  • Duplicated block (25 lines × 2) src/Senparc.Weixin.MP.Middleware/MessageHandlers/Middleware/MpMessageHandlerMiddleware.cs:79 — src/Senparc.Weixin.MP.Middleware/MessageHandlers/Middleware/MpMessageHandlerMiddleware.cs:79-103 | src/Senparc.Weixin.WxOpen.Middleware/MessageHandlers/Middleware/WxOpenMessageHandlerMiddleware.cs:80-104 — before extracting anything, compare `src/Senparc.Weixin.MP.Middleware/MessageHandlers/Middleware/MpMessageHandlerMiddleware.cs` and `src/Senparc.Weixin.WxOpen.Middleware/MessageHandlers/Middleware/WxOpenMessageHandlerMiddleware.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 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (25 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:237 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:237-265 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.cs:162-186 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.cs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:237` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) REDACTED:55 — REDACTED:55-79 | REDACTED:42-66 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (25 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:23 — Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:23-47 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Utilities/QrCodeHelper.cs:23-47 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs` and `Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Utilities/QrCodeHelper.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×4
  • Duplicated block (12 lines × 3) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:229 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:229-240 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/OAuthAccessTokenContainer.cs:168-179 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/WxCardApiTicketContainer.cs:202-213 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:229` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:753 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:753-764 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:799-810 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:896-907 — 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 `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:753` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) REDACTED:457 — REDACTED:457-468 | REDACTED:432-443 | REDACTED:457-468 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) REDACTED:127 — REDACTED:127-138 | REDACTED:127-138 | REDACTED:127-138 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 91% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:127` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×4
  • Duplicated block (13 lines × 4) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:137 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:137-149 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:183-195 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:229-241 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:326-338 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.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.
  • Duplicated block (13 lines × 4) REDACTED:154 — REDACTED:154-166 | REDACTED:205-217 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs:162-174 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs:232-244 — before extracting anything, compare `REDACTED` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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:154` 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 (13 lines × 4) REDACTED:243 — REDACTED:243-255 | REDACTED:215-227 | REDACTED:243-255 | REDACTED:324-336 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 4) REDACTED:143 — REDACTED:143-155 | REDACTED:174-186 | REDACTED:143-155 | REDACTED:174-186 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×4
  • Duplicated block (11 lines × 3) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:161 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:161-171 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:242-252 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:295-305 — 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 `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:161` 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 × 3) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:992 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:992-1002 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:1077-1087 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:1168-1178 — 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 `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:992` 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 × 3) REDACTED:714 — REDACTED:714-724 | REDACTED:682-692 | REDACTED:663-673 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:714` it does not close everything it opens, so those exact lines 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 × 3) REDACTED:56 — REDACTED:56-67 | REDACTED:55-65 | REDACTED:56-67 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×4
  • Duplicated block (7 lines × 4) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:384 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:384-390 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/ImmediateDelivery/ImmediateDeliveryApi.cs:434-441 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressApi.cs:262-269 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressProviderApi.cs:118-125 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `DeliveryProviderUpdateOrderStatusRequest` in one and `ImmediateDeliveryAddOrderRequest` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 4) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:374 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:374-380 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/ImmediateDelivery/ImmediateDeliveryApi.cs:423-430 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressApi.cs:251-258 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressProviderApi.cs:107-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `DeliveryProviderUpdateOrderStatusRequest` in one and `ImmediateDeliveryAddOrderRequest` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 4) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:374 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.cs:374-380 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/ImmediateDelivery/ImmediateDeliveryApi.cs:423-430 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressApi.cs:251-258 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressProviderApi.cs:107-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `request` to `DeliveryProviderUpdateOrderStatusRequest` in one and `ImmediateDeliveryAddOrderRequest` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 4) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/HomeVD.cs:46 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/HomeVD.cs:46-52 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/HomeVD.cs:46-52 | Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Models/VD/HomeVD.cs:46-52 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Models/VD/HomeVD.cs:46-52 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Models/VD/HomeVD.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/HomeVD.cs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×4
  • Duplicated block (23 lines × 3) REDACTED:50 — REDACTED:50-72 | REDACTED:48-70 | REDACTED:50-72 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:50` 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 (23 lines × 3) REDACTED:126 — REDACTED:126-148 | REDACTED:124-146 | REDACTED:126-148 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:126` 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 (23 lines × 3) REDACTED:448 — REDACTED:448-470 | REDACTED:448-470 | REDACTED:532-554 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 3) REDACTED:164 — REDACTED:164-186 | REDACTED:164-186 | REDACTED:156-178 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×4
  • Duplicated block (16 lines × 3) REDACTED:176 — REDACTED:176-191 | REDACTED:162-177 | REDACTED:176-191 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) REDACTED:223 — REDACTED:223-238 | REDACTED:205-220 | REDACTED:223-238 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) REDACTED:70 — REDACTED:70-85 | REDACTED:68-83 | REDACTED:70-85 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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 (16 lines × 3) REDACTED:401 — REDACTED:401-416 | REDACTED:401-416 | REDACTED:372-387 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:401` 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.
D5 · Coupling · Off the main sequence · ×4
  • Off the main sequence: Senparc.Weixin.net10(net462) src/Senparc.Weixin/Senparc.Weixin/Senparc.Weixin.net10.csproj:1 — Senparc.Weixin.net10(net462): abstractness 0.18, instability 0.00, distance 0.82 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
  • Off the main sequence: Senparc.Weixin.net8(net462) src/Senparc.Weixin/Senparc.Weixin/Senparc.Weixin.net8.csproj:1 — Senparc.Weixin.net8(net462): abstractness 0.18, instability 0.00, distance 0.82 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: Senparc.Weixin.MP.net8(net462) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Senparc.Weixin.MP.net8.csproj:1 — Senparc.Weixin.MP.net8(net462): abstractness 0.01, instability 0.20, distance 0.79 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
  • Off the main sequence: Senparc.Weixin.MP.net10(net462) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Senparc.Weixin.MP.net10.csproj:1 — Senparc.Weixin.MP.net10(net462): abstractness 0.01, instability 0.25, distance 0.74 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
R7 · Dead Code · Stale committed build artefact · ×4
  • Stale committed build artefact — its source no longer exists tools/WeixinDev/out/extension-backup.js.map — tools/WeixinDev/out/extension-backup.js.map sits in 'tools/WeixinDev/out', which tools/WeixinDev/tsconfig.json declares as this project's outDir, so it is committed compiler output; the map itself records that it was generated from 'tools/WeixinDev/src/extension-backup.ts', and no such file exists in the repository — its emitted file is already gone, only the map was left behind. 4 other map(s) in the same directory resolve to sources that do exist, which is what makes the absence provable rather than a path-resolution gap. Delete the orphaned artefact(s), or stop committing the output directory and let the build produce it.
  • Stale committed build artefact — its source no longer exists tools/WeixinDev/out/extension-complex.js.map — tools/WeixinDev/out/extension-complex.js.map sits in 'tools/WeixinDev/out', which tools/WeixinDev/tsconfig.json declares as this project's outDir, so it is committed compiler output; the map itself records that it was generated from 'tools/WeixinDev/src/extension-complex.ts', and no such file exists in the repository — its emitted file is already gone, only the map was left behind. 4 other map(s) in the same directory resolve to sources that do exist, which is what makes the absence provable rather than a path-resolution gap. Delete the orphaned artefact(s), or stop committing the output directory and let the build produce it.
  • Stale committed build artefact — its source no longer exists tools/WeixinDev/out/extension-minimal.js.map — tools/WeixinDev/out/extension-minimal.js.map sits in 'tools/WeixinDev/out', which tools/WeixinDev/tsconfig.json declares as this project's outDir, so it is committed compiler output; the map itself records that it was generated from 'tools/WeixinDev/src/extension-minimal.ts', and no such file exists in the repository — its emitted file is already gone, only the map was left behind. 4 other map(s) in the same directory resolve to sources that do exist, which is what makes the absence provable rather than a path-resolution gap. Delete the orphaned artefact(s), or stop committing the output directory and let the build produce it.
  • Stale committed build artefact — its source no longer exists tools/WeixinDev/out/extension-simple.js.map — tools/WeixinDev/out/extension-simple.js.map sits in 'tools/WeixinDev/out', which tools/WeixinDev/tsconfig.json declares as this project's outDir, so it is committed compiler output; the map itself records that it was generated from 'tools/WeixinDev/src/extension-simple.ts', and no such file exists in the repository — its emitted file is already gone, only the map was left behind. 4 other map(s) in the same directory resolve to sources that do exist, which is what makes the absence provable rather than a path-resolution gap. Delete the orphaned artefact(s), or stop committing the output directory and let the build produce it.
AC3 · Page structure · Page without a main landmark · ×3
  • Page without a main landmark tools/WeixinBrowserPlugin/src/demo-url-change-feature.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark tools/WeixinBrowserPlugin/src/popup.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark tools/WeixinBrowserPlugin/src/test.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D15 · Churn × Complexity Hotspots · Hotspot · ×3
  • Hotspot: src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:198 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in WorkMessageHandler.OnEventRequestAsync at line 198. 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-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 23:59:51 +08:00' --until='2026-09-29 23:59:51 +08:00' --full-history --no-merges -- src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.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: src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:76 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in DefaultWorkMessageContext.GetRequestEntityMappingResult at line 76. 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-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 23:59:51 +08:00' --until='2026-09-29 23:59:51 +08:00' --full-history --no-merges -- src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.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: src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs:59 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in RequestMessageFactory.GetRequestEntity at line 59. 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-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 23:59:51 +08:00' --until='2026-09-29 23:59:51 +08:00' --full-history --no-merges -- src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.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.
D17 · Explicit Debt · Whole file has no live code · ×3
  • Whole file has no live code — 5 debt markers inside it Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Controllers/Weixin/MP/WeixinAsyncController.cs:27 — Every line in this file is a comment or blank — it declares no type, member, using or attribute, so nothing in it reaches the build. Its 5 debt markers (5 CommentedOutCode) all sit inside that dead text: one decision to leave the whole file switched off, not 5 independent debts. It records no note anywhere: the file is switched off with nothing in it saying why, so a reader cannot tell whether it is waiting on something or was simply abandoned — which is the harder of the two to bring back. Decide the FILE rather than its lines — restore it, or delete it and let version control hold the history. (Every occurrence still counts toward the score and metrics.)
  • Whole file has no live code — 1 debt marker inside it Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/App_Start/Startup.cs:1 — Every line in this file is a comment or blank — it declares no type, member, using or attribute, so nothing in it reaches the build. Its 1 debt marker (1 CommentedOutCode) all sit inside that dead text: one decision to leave the whole file switched off, not 1 independent debts. It records no note anywhere: the file is switched off with nothing in it saying why, so a reader cannot tell whether it is waiting on something or was simply abandoned — which is the harder of the two to bring back. Decide the FILE rather than its lines — restore it, or delete it and let version control hold the history. (Every occurrence still counts toward the score and metrics.)
  • Whole file has no live code — 5 debt markers inside it Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinAsyncController.cs:27 — Every line in this file is a comment or blank — it declares no type, member, using or attribute, so nothing in it reaches the build. Its 5 debt markers (5 CommentedOutCode) all sit inside that dead text: one decision to leave the whole file switched off, not 5 independent debts. It records no note anywhere: the file is switched off with nothing in it saying why, so a reader cannot tell whether it is waiting on something or was simply abandoned — which is the harder of the two to bring back. Decide the FILE rather than its lines — restore it, or delete it and let version control hold the history. (Every occurrence still counts toward the score and metrics.)
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×3
  • Duplicated block (50 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:343 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:343-392 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:1039-1088 — both copies are in the same file, so extract the 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 (50 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequestData.cs:141 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequestData.cs:141-190 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequsetData.cs:80-129 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequestData.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/RefundRequsetData.cs` as WHOLE FILES: this scan already matched 3 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.
  • Duplicated block (50 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateUniqueThresholdActivityRequestData.cs:351 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateUniqueThresholdActivityRequestData.cs:351-401 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivitiesReturnJson.cs:509-558 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (50 lines × 3) · ×3
  • Duplicated block (50 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/ReturnJson/EcommerceReturnJson.cs:484 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/ReturnJson/EcommerceReturnJson.cs:484-533 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:141-191 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs:141-191 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (50 lines × 3) REDACTED:222 — REDACTED:222-271 | REDACTED:203-252 | REDACTED:222-271 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:222` 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 (50 lines × 3) REDACTED:1086 — REDACTED:1086-1135 | REDACTED:1086-1135 | REDACTED:1090-1139 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1086` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×3
  • Duplicated block (45 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/RequestData/CreateDirectCompleteServiceOrderRequestData.cs:112 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/RequestData/CreateDirectCompleteServiceOrderRequestData.cs:112-156 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/RequestData/CreateServiceOrderRequestData.cs:110-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.
  • Duplicated block (45 lines × 2) REDACTED:168 — REDACTED:168-212 | REDACTED:150-194 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (45 lines × 2) REDACTED:110 — REDACTED:110-154 | REDACTED:110-154 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×3
  • Duplicated block (41 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/ReturnJson/EcommerceReturnJson.cs:416 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/ReturnJson/EcommerceReturnJson.cs:416-456 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/ReturnJson/EcommerceReturnJson.cs:500-540 — both copies are in the same file, so extract the 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 (41 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Result/MiniAppRedPackResult.cs:68 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Result/MiniAppRedPackResult.cs:68-108 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Result/NormalRedPackResult.cs:72-112 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Result/MiniAppRedPackResult.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Result/NormalRedPackResult.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.
  • Duplicated block (41 lines × 2) REDACTED:27 — REDACTED:27-67 | REDACTED:27-67 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×3
  • Duplicated block (39 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingJson.cs:257 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingJson.cs:257-295 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingJson.cs:349-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (39 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:320 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:320-358 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:855-893 — both copies are in the same file, so extract the 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 (39 lines × 2) REDACTED:122 — REDACTED:122-160 | REDACTED:122-160 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:122` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×3
  • Duplicated block (35 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformData.cs:125 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformData.cs:125-159 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/InvoiceData.cs:20-54 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformData.cs` and `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/InvoiceData.cs` as WHOLE FILES: 90% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (35 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:262 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:262-296 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:798-832 — both copies are in the same file, so extract the 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 (35 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3PayToWorkerRequestData.cs:83 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3PayToWorkerRequestData.cs:83-117 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3TransfersRequestData.cs:83-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.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×3
  • Duplicated block (32 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/CancelOrderModel.cs:8 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/CancelOrderModel.cs:8-39 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/PreCancelOrderModel.cs:8-39 — before extracting anything, compare `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/CancelOrderModel.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/PreCancelOrderModel.cs` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the 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 (32 lines × 2) REDACTED:47 — REDACTED:47-78 | REDACTED:47-78 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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. The matched lines also transfer control out of the body holding them, 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 (32 lines × 2) REDACTED:45 — REDACTED:45-76 | REDACTED:45-76 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×3
  • Duplicated block (29 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:128 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:128-156 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:125-153 — `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 83 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:125` calls `Hashtable` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:121` 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 (29 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:124 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs:124-152 | src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs:144-172 — before extracting anything, compare `src/Senparc.Weixin.Work/Senparc.Weixin.Work/Tencent/Cryptography.cs` and `src/Senparc.Weixin/Senparc.Weixin/Tencent/Cryptography.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (29 lines × 2) REDACTED:86 — REDACTED:86-114 | REDACTED:92-120 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:86` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×3
  • Duplicated block (22 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/ModifyDomain/ModifyDomainApi.cs:72 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/ModifyDomain/ModifyDomainApi.cs:72-93 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/ModifyDomain/ModifyDomainApi.cs:123-144 — both copies are in the same file, so extract the 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 (22 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubCurrentRequestData.cs:277 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubCurrentRequestData.cs:277-298 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Subject/Entities/RequestData/Apply4SubjectCurrentRequestData.cs:266-287 — 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 (22 lines × 2) REDACTED:63 — REDACTED:63-84 | REDACTED:63-84 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×3
  • Duplicated block (21 lines × 3) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBase/CloudBaseModels.cs:68 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBase/CloudBaseModels.cs:68-88 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBaseBatch/CloudBaseBatchModels.cs:133-153 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudRun/CloudRunJsonResults.cs:143-177 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBase/CloudBaseModels.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 (21 lines × 3) REDACTED:163 — REDACTED:163-183 | REDACTED:161-181 | REDACTED:163-183 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 3) REDACTED:829 — REDACTED:829-849 | REDACTED:829-849 | REDACTED:833-853 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×3
  • Duplicated block (5 lines × 3) REDACTED:131 — REDACTED:131-135 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs:184-188 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/Verifier/SHA256WithRSAVerifier.cs:37-41 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/Verifier/SHA256WithRSAVerifier.cs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/RequestData/CompleteServiceOrderRequestData.cs:295 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/RequestData/CompleteServiceOrderRequestData.cs:295-299 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/RequestData/CreateDirectCompleteServiceOrderRequestData.cs:298-302 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/RequestData/CreateServiceOrderRequestData.cs:301-305 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (5 lines × 3) REDACTED:460 — REDACTED:460-464 | REDACTED:460-464 | REDACTED:431-435 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (7 members, 50+ identical tokens) REDACTED:67 — REDACTED:67-77 | REDACTED:65-75 | REDACTED:44-54 | REDACTED:45-55 | REDACTED:67-77 | REDACTED:65-75 | REDACTED:57-67 — 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) REDACTED:223 — REDACTED:223-256 | REDACTED:130-163 | REDACTED:113-139 | REDACTED:223-256 | REDACTED:130-163 | REDACTED:126-159 | REDACTED:214-247 — 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) REDACTED:334 — REDACTED:334-416 | REDACTED:477-550 | REDACTED:415-537 | REDACTED:334-416 | REDACTED:477-550 | REDACTED:238-312 | REDACTED:323-387 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Duplicated block (67 lines × 2) · ×3
  • Duplicated block (67 lines × 2) REDACTED:277 — REDACTED:277-343 | REDACTED:277-343 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (67 lines × 2) REDACTED:82 — REDACTED:82-148 | REDACTED:82-148 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (67 lines × 2) REDACTED:56 — REDACTED:56-122 | REDACTED:58-124 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (39 lines × 3) · ×3
  • Duplicated block (39 lines × 3) REDACTED:618 — REDACTED:618-656 | REDACTED:586-624 | REDACTED:558-596 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:618` 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 (39 lines × 3) REDACTED:295 — REDACTED:295-333 | REDACTED:295-333 | REDACTED:375-413 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (39 lines × 3) REDACTED:616 — REDACTED:616-654 | REDACTED:616-654 | REDACTED:621-659 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×3
  • Duplicated block (20 lines × 3) REDACTED:77 — REDACTED:77-96 | REDACTED:80-99 | REDACTED:77-96 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 3) REDACTED:478 — REDACTED:478-497 | REDACTED:478-497 | REDACTED:239-258 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:478` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 3) REDACTED:563 — REDACTED:563-582 | REDACTED:563-582 | REDACTED:568-587 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×3
  • Duplicated block (18–19 lines × 3) REDACTED:189 — REDACTED:189-207 | REDACTED:189-206 | REDACTED:189-207 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 91% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:189` 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–19 lines × 3) REDACTED:276 — REDACTED:276-293 | REDACTED:259-277 | REDACTED:276-293 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:276` it does not close everything it opens, so those exact lines 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 × 3) REDACTED:388 — REDACTED:388-406 | REDACTED:365-382 | REDACTED:388-406 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:388` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×3
  • Duplicated block (8 lines × 4) REDACTED:115 — REDACTED:115-122 | REDACTED:109-116 | REDACTED:115-122 | REDACTED:116-123 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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 (8 lines × 4) REDACTED:922 — REDACTED:922-929 | REDACTED:875-882 | REDACTED:922-929 | REDACTED:926-933 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) REDACTED:200 — REDACTED:200-207 | REDACTED:172-179 | REDACTED:200-207 | REDACTED:192-199 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:200` 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.
GD1 · Unfinished & placeholder code · Unfinished stub · ×3
  • Unfinished stub — throws NotImplementedException src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Memcached/ContainerCacheStrategy/MemcachedContainerCacheStrategy.cs:89 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundRequestHandler.cs:59 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Dapr/ContainerCacheStrategy/DaprContainerCacheStrategy.cs:117 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Unfinished stub · ×3
  • Unfinished stub — throws NotImplementedException src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Dapr/ContainerCacheStrategy/DaprContainerCacheStrategy.cs:117 — `GetAll` 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 src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Memcached/ContainerCacheStrategy/MemcachedContainerCacheStrategy.cs:89 — `GetAll` 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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundRequestHandler.cs:59 — `SetParameter` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Fake-async · ×3
  • Fake-async — async method never awaits src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/Async/MessageHandlerAsync.Event.cs:558 — `OnEvent_ShakearoundUserShakeRequestAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Template/TemplateApi.cs:196 — `ListAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Template/TemplateApi.cs:209 — `DelAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
X20 · Mistyped argument guard · Argument guard throws the exception its own condition disproves · ×3
  • Argument guard throws the exception its own condition disproves src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1281 — The guard on line 1279 rejects `appKey` and line 1281 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(appKey)` is true of a value that is NOT null: it is satisfied by an EMPTY `appKey`, and on that path `appKey` 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 src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1285 — The guard on line 1283 rejects `uri` and line 1285 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(uri)` is true of a value that is NOT null: it is satisfied by an EMPTY `uri`, and on that path `uri` 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 src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayApi.cs:1316 — The guard on line 1314 rejects `sessionKey` and line 1316 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(sessionKey)` is true of a value that is NOT null: it is satisfied by an EMPTY `sessionKey`, and on that path `sessionKey` 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.
D17 · Explicit Debt · BarePragmaDisable · ×2
  • BarePragmaDisable src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayJsonSerializer.cs:78 — #pragma warning disable IL2026 — 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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayJsonSerializer.cs:79 — #pragma warning disable IL3050 — 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.
D2 · Cognitive Complexity · CommonApi.GetMenuFromJson (cognitive 17) · ×2
  • CommonApi.GetMenuFromJson (cognitive 17) src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:117 — CommonApi.GetMenuFromJson 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.
  • CommonApi.GetMenuFromJson (cognitive 17) src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs:165 — CommonApi.GetMenuFromJson has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SimulateToolController.Index (cognitive 16) · ×2
  • SimulateToolController.Index (cognitive 16) REDACTED:344 — SimulateToolController.Index 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.
  • SimulateToolController.Index (cognitive 16) REDACTED:344 — SimulateToolController.Index 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (12 members, 50+ identical tokens) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:159 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:159-196 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:208-246 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:261-303 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:319-364 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:376-424 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:437-473 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:698-734 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:746-782 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:797-838 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:854-900 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:912-962 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:976-1012 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
  • Members sharing a duplicated core (12 members, 50+ identical tokens) REDACTED:91 — REDACTED:91-154 | REDACTED:161-199 | REDACTED:206-269 | REDACTED:439-477 | REDACTED:70-143 | REDACTED:147-185 | REDACTED:188-251 | REDACTED:414-452 | REDACTED:91-154 | REDACTED:161-199 | REDACTED:206-269 | REDACTED:439-477 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (5 members, 50+ identical tokens) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:99 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:99-260 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:175-331 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:369-531 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:719-857 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/ShakeRedPackApi.cs:142-265 — 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) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs:69 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs:69-87 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:71-91 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:69-88 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:70-90 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/SyncPayServiceOrderReturnJson.cs:70-90 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (94 lines × 2) · ×2
  • Duplicated block (94 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/PayBusifavorReceiptsReturnJson.cs:86 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/PayBusifavorReceiptsReturnJson.cs:86-179 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorPayReceiptsReturnJson.cs:86-179 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/PayBusifavorReceiptsReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorPayReceiptsReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (94 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:19 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:19-112 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:18-111 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs` and `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (70 lines × 2) · ×2
  • Duplicated block (70 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs:439 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs:439-508 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs:997-1066 — both copies are in the same file, so extract the 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 (70 lines × 2) REDACTED:34 — REDACTED:34-103 | REDACTED:34-103 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (62 lines × 2) · ×2
  • Duplicated block (62 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.cs:199 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.cs:199-260 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/UnfreezeProfitsharingReturnJson.cs:144-205 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/UnfreezeProfitsharingReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (62 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:148 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:148-209 | Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs:132-193 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs` and `Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (58–60 lines × 3) · ×2
  • Duplicated block (58–60 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/PayBusifavorReceiptsRequestData.cs:76 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/PayBusifavorReceiptsRequestData.cs:76-135 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/PayBusifavorReceiptsReturnJson.cs:91-148 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorPayReceiptsReturnJson.cs:91-148 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/PayBusifavorReceiptsReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorPayReceiptsReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/PayBusifavorReceiptsRequestData.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 (58–60 lines × 3) REDACTED:87 — REDACTED:87-146 | REDACTED:87-146 | REDACTED:79-136 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 236 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (53 lines × 2) · ×2
  • Duplicated block (53 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingWebinarJson.cs:71 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingWebinarJson.cs:71-123 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingWebinarJson.cs:175-227 — both copies are in the same file, so extract the 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 (53 lines × 2) REDACTED:59 — REDACTED:59-111 | REDACTED:59-111 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (54 lines × 2) · ×2
  • Duplicated block (54 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryPermissionByAuthorizationCodeReturnJson.cs:75 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryPermissionByAuthorizationCodeReturnJson.cs:75-128 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryPermissionByOpenidReturnJson.cs:73-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 (54 lines × 2) REDACTED:105 — REDACTED:105-158 | REDACTED:105-158 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×2
  • Duplicated block (51 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs:287 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs:287-337 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs:845-895 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs:287` it does not close everything it opens, so those 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 (51 lines × 2) REDACTED:349 — REDACTED:349-399 | REDACTED:349-399 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×2
  • Duplicated block (47 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BusinessCircle/Entities/NotifyJson/BusinessCircleNotifyJson.cs:81 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BusinessCircle/Entities/NotifyJson/BusinessCircleNotifyJson.cs:81-127 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BusinessCircle/Entities/NotifyJson/BusinessCircleRefundNotifyJson.cs:84-130 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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 (47 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/NotifyJson/ParkingStateNotifyJson.cs:98 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/NotifyJson/ParkingStateNotifyJson.cs:98-144 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/CreateParkingReturnJson.cs:86-132 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (52 lines × 2) · ×2
  • Duplicated block (52 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:578 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:578-629 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:593-647 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (52 lines × 2) REDACTED:75 — REDACTED:75-126 | REDACTED:75-126 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×2
  • Duplicated block (49 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/PayTool/PayToolJson.cs:554 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/PayTool/PayToolJson.cs:554-602 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/PayTool/PayToolJson.cs:632-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.
  • Duplicated block (49 lines × 2) REDACTED:91 — REDACTED:91-139 | REDACTED:91-139 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×2
  • Duplicated block (40 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/CardManageResultJson.cs:189 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/CardManageResultJson.cs:189-228 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/CardManageResultJson.cs:250-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (40 lines × 2) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:70 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:70-109 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:56-95 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 433 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (37–38 lines × 2) · ×2
  • Duplicated block (37–38 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:360 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:360-397 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:929-965 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.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. 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 (37–38 lines × 2) REDACTED:334 — REDACTED:334-371 | REDACTED:267-303 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×2
  • Duplicated block (34 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/MerchantGovernance/MerchantGovernanceModels.cs:141 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/MerchantGovernance/MerchantGovernanceModels.cs:141-174 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayJson/XPayIncrementJson.cs:113-146 — 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 (34 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Report/PatrolReportJson.cs:246 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Report/PatrolReportJson.cs:246-279 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Report/ResidentReportJson.cs:256-289 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×2
  • Duplicated block (19 lines × 4) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:72 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:72-90 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:159-177 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:322-340 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:409-427 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.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 (19 lines × 4) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:111 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:111-129 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:361-379 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/SetWebViewDomain/SetWebViewDomainApi.cs:60-78 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/SetWebViewDomain/SetWebViewDomainApi.cs:101-119 — before extracting anything, compare `src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs` and `src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/SetWebViewDomain/SetWebViewDomainApi.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 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×2
  • Duplicated block (17 lines × 3) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:363 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:363-379 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:464-480 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/SetWebViewDomain/SetWebViewDomainApi.cs:103-119 — before extracting anything, compare `src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs` and `src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/SetWebViewDomain/SetWebViewDomainApi.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 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 3) REDACTED:103 — REDACTED:103-119 | REDACTED:103-119 | REDACTED:104-120 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (17 lines × 6) · ×2
  • Duplicated block (17 lines × 6) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:72 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:72-88 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:159-175 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:322-338 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.cs:409-425 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/ModifyDomain/ModifyDomainApi.cs:74-90 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/ModifyDomain/ModifyDomainApi.cs:125-141 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainApi.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 (17 lines × 6) REDACTED:215 — REDACTED:215-231 | REDACTED:1125-1141 | REDACTED:215-231 | REDACTED:1125-1141 | REDACTED:211-227 | REDACTED:1129-1145 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:215` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×2
  • Duplicated block (16 lines × 4) REDACTED:145 — REDACTED:145-160 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs:153-168 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:252-267 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:278-293 — before extracting anything, compare `REDACTED` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) REDACTED:124 — REDACTED:124-139 | REDACTED:99-114 | REDACTED:124-139 | REDACTED:82-97 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:124` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×2
  • Duplicated block (15 lines × 4) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:220 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:220-237 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/OAuthAccessTokenContainer.cs:159-176 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/WxCardApiTicketContainer.cs:193-210 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/Containers/ComponentContainer.cs:500-514 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.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.
  • Duplicated block (15 lines × 4) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Filters/CustomOAuthAttribute.cs:20 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Filters/CustomOAuthAttribute.cs:20-34 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Filters/CustomOAuthAttribute.cs:20-34 | Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Filters/CustomOAuthAttribute.cs:21-35 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Filters/CustomOAuthAttribute.cs:21-35 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Filters/CustomOAuthAttribute.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Filters/CustomOAuthAttribute.cs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×2
  • Duplicated block (11 lines × 4) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:183 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:183-193 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:210-220 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:236-246 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:291-301 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:183` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:419 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:419-429 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:446-456 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:472-482 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:527-537 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Comment/CommentApi.cs:419` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×2
  • Duplicated block (12 lines × 4) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:70 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:70-81 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:101-112 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs:70-81 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs:101-112 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:101` 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 × 4) REDACTED:1007 — REDACTED:1007-1018 | REDACTED:958-969 | REDACTED:1007-1018 | REDACTED:1011-1022 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 8) · ×2
  • Duplicated block (6 lines × 8) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpData.cs:23 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpData.cs:23-28 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpData.cs:47-52 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpData.cs:72-77 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpData.cs:95-100 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpData.cs:122-127 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpData.cs:147-152 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpData.cs:174-179 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpData.cs:207-212 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 8) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:314 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:314-320 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:416-421 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:451-457 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:651-657 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:765-771 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:801-807 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:840-846 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:875-881 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–8 lines × 7) · ×2
  • Duplicated block (7–8 lines × 7) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:416 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:416-422 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:451-458 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:651-658 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:765-772 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:801-808 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:840-847 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:875-882 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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–8 lines × 7) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1182 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1182-1189 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1218-1225 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1255-1261 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1338-1345 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1372-1379 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1405-1412 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1440-1447 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (68 lines × 2) · ×2
  • Duplicated block (68 lines × 2) REDACTED:136 — REDACTED:136-203 | REDACTED:136-203 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (68 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/LocationService.cs:25 — Samples/All/Senparc.Weixin.Sample.CommonService/LocationService.cs:25-92 | Samples/MP/Senparc.Weixin.Sample.MP/Services/LocationService.cs:25-92 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/LocationService.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/Services/LocationService.cs` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×2
  • Duplicated block (43 lines × 2) REDACTED:35 — REDACTED:35-77 | REDACTED:35-77 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (43 lines × 2) REDACTED:35 — REDACTED:35-77 | REDACTED:35-77 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (32 lines × 3) · ×2
  • Duplicated block (32 lines × 3) REDACTED:411 — REDACTED:411-442 | REDACTED:411-442 | REDACTED:324-355 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (32 lines × 3) REDACTED:172 — REDACTED:172-203 | REDACTED:170-201 | REDACTED:172-203 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:172` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (30 lines × 3) · ×2
  • Duplicated block (30 lines × 3) REDACTED:265 — REDACTED:265-294 | REDACTED:265-294 | REDACTED:256-285 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:265` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (30 lines × 3) REDACTED:324 — REDACTED:324-353 | REDACTED:373-402 | REDACTED:453-482 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:324` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×2
  • Duplicated block (25 lines × 3) REDACTED:169 — REDACTED:169-193 | REDACTED:169-193 | REDACTED:165-189 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:169` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 3) REDACTED:201 — REDACTED:201-225 | REDACTED:201-225 | REDACTED:197-221 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:201` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×2
  • Duplicated block (22 lines × 3) REDACTED:351 — REDACTED:351-372 | REDACTED:331-352 | REDACTED:351-372 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (22 lines × 3) REDACTED:572 — REDACTED:572-593 | REDACTED:572-593 | REDACTED:485-506 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×2
  • Duplicated block (19 lines × 3) REDACTED:590 — REDACTED:590-608 | REDACTED:590-608 | REDACTED:595-613 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 3) REDACTED:105 — REDACTED:105-123 | REDACTED:110-128 | REDACTED:105-123 — before extracting anything, compare `REDACTED` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:105` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–18 lines × 4) · ×2
  • Duplicated block (11–18 lines × 4) REDACTED:514 — REDACTED:514-529 | REDACTED:514-529 | REDACTED:282-292 | REDACTED:355-372 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:514` 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–18 lines × 4) REDACTED:499 — REDACTED:499-516 | REDACTED:514-529 | REDACTED:282-292 | REDACTED:355-372 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:499` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×2
  • Duplicated block (16–17 lines × 3) REDACTED:127 — REDACTED:127-143 | REDACTED:108-123 | REDACTED:127-143 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16–17 lines × 3) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:324 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:324-340 | Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Global.asax.cs:191-206 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:310-326 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 433 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:324` it begins part-way through the construct above it, so those 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, `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:341` calls `Close` and `Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Global.asax.cs:207` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×2
  • Duplicated block (12–14 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/CustomMessageHandler_AI.cs:471 — Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/CustomMessageHandler_AI.cs:471-484 | Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/CustomMessageHandler_AI.cs:577-588 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–14 lines × 2) REDACTED:709 — REDACTED:709-720 | REDACTED:693-706 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:706` calls `FundflowBillQueryRequestData` and `REDACTED:720` 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.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×2
  • Duplicated block (9 lines × 5) REDACTED:519 — REDACTED:519-527 | REDACTED:506-514 | REDACTED:519-527 | REDACTED:282-290 | REDACTED:362-370 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 5) REDACTED:76 — REDACTED:76-84 | REDACTED:58-66 | REDACTED:80-88 | REDACTED:81-89 | REDACTED:48-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×2
  • Duplicated block (5 lines × 5) REDACTED:397 — REDACTED:397-401 | REDACTED:525-529 | REDACTED:525-529 | REDACTED:288-292 | REDACTED:368-372 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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: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.
  • Duplicated block (5 lines × 5) REDACTED:512 — REDACTED:512-516 | REDACTED:397-401 | REDACTED:525-529 | REDACTED:288-292 | REDACTED:368-372 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:512` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D44 · Platform End-of-Life · End-of-life runtime · ×2
  • End-of-life runtime: .NET net6.0 src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis.Tests/Senparc.Weixin.Cache.CsRedis.Tests.net8.csproj:4 — src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis.Tests/Senparc.Weixin.Cache.CsRedis.Tests.net8.csproj declares .NET net6.0 as this project's target framework, and .NET 6 LTS, support ended 2024-11-12. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-11-12 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
  • End-of-life runtime: .NET netcoreapp3.1 Samples/All/Senparc.Weixin.Sample.CommonService/Senparc.Weixin.NetCore3Sample.CommonService.csproj:4 — Samples/All/Senparc.Weixin.Sample.CommonService/Senparc.Weixin.NetCore3Sample.CommonService.csproj declares .NET netcoreapp3.1 as this project's target framework, and .NET Core 3.1 LTS, support ended 2022-12-13. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2022-12-13 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: TenPayHttpClient (LCOM4 6) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/TenPayHttpClient.cs:62 — TenPayHttpClient'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: MsgAuditFinanceNativeApi (LCOM4 6) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MsgAudit/MsgAuditFinanceNativeApi.cs:75 — MsgAuditFinanceNativeApi'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.
R2 · Cyclomatic Complexity · Complex function s (cyclomatic 18, cognitive 19) · ×2
  • Complex function s (cyclomatic 18, cognitive 19) src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:88 — s has cyclomatic complexity 18 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function s (cyclomatic 18, cognitive 19) src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js:88 — s has cyclomatic complexity 18 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function a (cyclomatic 17, cognitive 18) · ×2
  • Complex function a (cyclomatic 17, cognitive 18) src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:36 — a has cyclomatic complexity 17 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function a (cyclomatic 17, cognitive 18) src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js:36 — a has cyclomatic complexity 17 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function on (cyclomatic 15, cognitive 14) · ×2
  • Complex function on (cyclomatic 15, cognitive 14) src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:457 — on has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function on (cyclomatic 15, cognitive 14) src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js:457 — on has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 11, cognitive 13) · ×2
  • Complex function (anonymous) (cyclomatic 11, cognitive 13) src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:434 — (anonymous) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function (anonymous) (cyclomatic 11, cognitive 13) src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js:434 — (anonymous) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R7 · Dead Code · Dead file (~508 LoC) · ×2
  • Dead file (~508 LoC) src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~508 LoC) src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~225 LoC) · ×2
  • Dead file (~225 LoC) src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/components/create/createstep.js — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~225 LoC) src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/components/create/createstep.js — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~131 LoC) · ×2
  • Dead file (~131 LoC) src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/stores/projectStores.js — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~131 LoC) src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/stroes/projectStores.js — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
X1 · Async correctness · Sync-over-async (deadlock risk) through `.Result` · ×2
  • Sync-over-async (deadlock risk) through `.Result` REDACTED:88 — 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` REDACTED:122 — 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.
AC3 · Page structure · Heading level jumps from h1 to h3 · ×1
  • Heading level jumps from h1 to h3 tools/WeixinBrowserPlugin/src/demo-url-change-feature.html:213 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have) and no axe/pa11y/Lighthouse in tests or CI. Start by running that check over your rendered pages in CI. What was searched, so you can tell an absence from a miss: the 4 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · DefaultWorkMessageContext.GetRequestEntityMappingResult (cyclomatic 74) · ×1
  • DefaultWorkMessageContext.GetRequestEntityMappingResult (cyclomatic 74) src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:76 — DefaultWorkMessageContext.GetRequestEntityMappingResult has cyclomatic complexity 74 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WorkMessageHandler.OnEventRequestAsync (cyclomatic 68) · ×1
  • WorkMessageHandler.OnEventRequestAsync (cyclomatic 68) src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs:198 — WorkMessageHandler.OnEventRequestAsync has cyclomatic complexity 68 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EntityHelper.FillEntityWithXml (cyclomatic 48) · ×1
  • EntityHelper.FillEntityWithXml (cyclomatic 48) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Helpers/EntityHelper.cs:96 — EntityHelper.FillEntityWithXml has cyclomatic complexity 48 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · CommonApi.GetButtonGroup (cyclomatic 41) · ×1
  • CommonApi.GetButtonGroup (cyclomatic 41) src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs:91 — CommonApi.GetButtonGroup has cyclomatic complexity 41 (threshold 15). Of this number, 40 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RequestMessageFactory.GetRequestEntity (cyclomatic 30) · ×1
  • RequestMessageFactory.GetRequestEntity (cyclomatic 30) src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs:59 — RequestMessageFactory.GetRequestEntity has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CustomMessageHandler.AIChatAsync (cyclomatic 30) · ×1
  • CustomMessageHandler.AIChatAsync (cyclomatic 30) Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/CustomMessageHandler_AI.cs:121 — CustomMessageHandler.AIChatAsync has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommonApi.GetMenuFromJsonResult (cyclomatic 26) · ×1
  • CommonApi.GetMenuFromJsonResult (cyclomatic 26) src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:223 — CommonApi.GetMenuFromJsonResult has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RedPackApi.SearchRedPack (cyclomatic 25) · ×1
  • RedPackApi.SearchRedPack (cyclomatic 25) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:544 — RedPackApi.SearchRedPack has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RedPackApi.SendNormalRedPackViaProvider (cyclomatic 24) · ×1
  • RedPackApi.SendNormalRedPackViaProvider (cyclomatic 24) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:94 — RedPackApi.SendNormalRedPackViaProvider has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RequestHandler.CreateMd5Sign (cyclomatic 23) · ×1
  • RequestHandler.CreateMd5Sign (cyclomatic 23) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/RequestHandler.cs:199 — RequestHandler.CreateMd5Sign has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RedPackApi.SendNormalRedPack (cyclomatic 23) · ×1
  • RedPackApi.SendNormalRedPack (cyclomatic 23) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:170 — RedPackApi.SendNormalRedPack has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (RedPackApi.SendNGroupRedPack) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · RedPackApi.SendNGroupRedPack (cyclomatic 23) · ×1
  • RedPackApi.SendNGroupRedPack (cyclomatic 23) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:365 — RedPackApi.SendNGroupRedPack has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (RedPackApi.SendNormalRedPack) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · TenPayApiRequest.RequestMultipartCoreAsync (cyclomatic 22) · ×1
  • TenPayApiRequest.RequestMultipartCoreAsync (cyclomatic 22) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:370 — TenPayApiRequest.RequestMultipartCoreAsync has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ApiHandlerWapperBase.TryCommonApiBase (cyclomatic 21) · ×1
  • ApiHandlerWapperBase.TryCommonApiBase (cyclomatic 21) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:133 — ApiHandlerWapperBase.TryCommonApiBase has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ApiHandlerWapperBase.TryCommonApiBaseAsync (cyclomatic 21) · ×1
  • ApiHandlerWapperBase.TryCommonApiBaseAsync (cyclomatic 21) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:287 — ApiHandlerWapperBase.TryCommonApiBaseAsync has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RedPackApi.SendMiniAppRedPack (cyclomatic 21) · ×1
  • RedPackApi.SendMiniAppRedPack (cyclomatic 21) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:714 — RedPackApi.SendMiniAppRedPack has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · extension.activate (cyclomatic 21) · ×1
  • extension.activate (cyclomatic 21) tools/WeixinDev/src/extension.ts:4 — extension.activate has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 44, 8, 23). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · EntityHelper.ConvertEntityToXml (cyclomatic 19) · ×1
  • EntityHelper.ConvertEntityToXml (cyclomatic 19) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Helpers/EntityHelper.cs:324 — EntityHelper.ConvertEntityToXml has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SecurityHelper.RSAFromXmlString (cyclomatic 19) · ×1
  • SecurityHelper.RSAFromXmlString (cyclomatic 19) REDACTED:270 — SecurityHelper.RSAFromXmlString has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MessageHandler.Init (cyclomatic 18) · ×1
  • MessageHandler.Init (cyclomatic 18) src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:238 — MessageHandler.Init has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ShakeRedPackApi.HbPreOrder (cyclomatic 16) · ×1
  • ShakeRedPackApi.HbPreOrder (cyclomatic 16) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/ShakeRedPackApi.cs:138 — ShakeRedPackApi.HbPreOrder 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.
D18 · Solution Shape · Build failed · ×1
  • Build failed — The target solution did not build cleanly (errors: 254), which caps Solution Shape at 3/10 — the most basic shape signal is that it compiles. First errors: CS0234: The type or namespace name 'AgentKernel' does not exist in the namespace 'Senparc.AI' (are you missing an assembly reference?); MSB4019: The imported project "/usr/share/dotnet/sdk/10.0.400/Microsoft/VisualStudio/v18.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "$(VSToolsPath)/WebApplications/Microsoft.WebApplication.targets", which evaluated to "/usr/share/dotnet/sdk/10.0.400/Microsoft/VisualStudio/v18.0/WebApplications/Microsoft.WebApplication.targets", is correct, and that the file exists on disk.; CS0234: The type or namespace name 'CO2NET' does not exist in the namespace 'Senparc' (are you missing an assembly reference?); CS0234: The type or namespace name 'NeuChar' does not exist in the namespace 'Senparc' (are you missing an assembly reference?); CS0234: The type or namespace name 'Exceptions' does not exist in the namespace 'Senparc.Weixin' (are you missing an assembly reference?); CS0234: The type or namespace name 'MP' does not exist in the namespace 'Senparc.Weixin' (are you missing an assembly reference?).
D18 · Solution Shape · Solution references 5 projects that do not exist · ×1
  • Solution references 5 projects that do not exist src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net6.sln — `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net6.sln` declares 5 project file(s) that are missing from the tree (`src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/Senparc.Weixin.MP.Test.net6.csproj`, `src/Senparc.Weixin.MP/Senparc.Weixin.MP/Senparc.Weixin.MP.net6.csproj`, `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.Tests/Senparc.Weixin.WxOpen.Tests.net6.csproj`, `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net6.csproj`, `src/Senparc.Weixin/Senparc.Weixin/Senparc.Weixin.net6.csproj`). A solution-level restore or build fails on a dangling reference, so anyone building the solution rather than an individual project is blocked. Delete the stale entry from the solution, or restore the missing project file.
D2 · Cognitive Complexity · EntityHelper.FillEntityWithXml (cognitive 67) · ×1
  • EntityHelper.FillEntityWithXml (cognitive 67) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Helpers/EntityHelper.cs:96 — EntityHelper.FillEntityWithXml has cognitive complexity 67 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · RedPackApi.SearchRedPack (cognitive 66) · ×1
  • RedPackApi.SearchRedPack (cognitive 66) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:544 — RedPackApi.SearchRedPack has cognitive complexity 66 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommonApi.GetButtonGroup (cognitive 61) · ×1
  • CommonApi.GetButtonGroup (cognitive 61) src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Common.cs:91 — CommonApi.GetButtonGroup has cognitive complexity 61 (threshold 15). Of this number, 60 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RedPackApi.SendNormalRedPackViaProvider (cognitive 54) · ×1
  • RedPackApi.SendNormalRedPackViaProvider (cognitive 54) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:94 — RedPackApi.SendNormalRedPackViaProvider has cognitive complexity 54 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RedPackApi.SendNormalRedPack (cognitive 53) · ×1
  • RedPackApi.SendNormalRedPack (cognitive 53) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:170 — RedPackApi.SendNormalRedPack 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. This shape REPEATS in the file: one other method here (RedPackApi.SendNGroupRedPack) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · RedPackApi.SendNGroupRedPack (cognitive 53) · ×1
  • RedPackApi.SendNGroupRedPack (cognitive 53) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:365 — RedPackApi.SendNGroupRedPack 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. This shape REPEATS in the file: one other method here (RedPackApi.SendNormalRedPack) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · CustomMessageHandler.AIChatAsync (cognitive 52) · ×1
  • CustomMessageHandler.AIChatAsync (cognitive 52) Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/CustomMessageHandler_AI.cs:121 — CustomMessageHandler.AIChatAsync has cognitive complexity 52 (threshold 15). Of this number, 46 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · RedPackApi.SendMiniAppRedPack (cognitive 49) · ×1
  • RedPackApi.SendMiniAppRedPack (cognitive 49) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:714 — RedPackApi.SendMiniAppRedPack has cognitive complexity 49 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommonApi.GetMenuFromJsonResult (cognitive 45) · ×1
  • CommonApi.GetMenuFromJsonResult (cognitive 45) src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:223 — CommonApi.GetMenuFromJsonResult has cognitive complexity 45 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TenPayApiRequest.RequestMultipartCoreAsync (cognitive 40) · ×1
  • TenPayApiRequest.RequestMultipartCoreAsync (cognitive 40) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:370 — TenPayApiRequest.RequestMultipartCoreAsync has cognitive complexity 40 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SecurityHelper.RSAFromXmlString (cognitive 39) · ×1
  • SecurityHelper.RSAFromXmlString (cognitive 39) REDACTED:270 — SecurityHelper.RSAFromXmlString has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShakeRedPackApi.HbPreOrder (cognitive 38) · ×1
  • ShakeRedPackApi.HbPreOrder (cognitive 38) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/ShakeRedPackApi.cs:138 — ShakeRedPackApi.HbPreOrder has cognitive complexity 38 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ApiHandlerWapperBase.TryCommonApiBase (cognitive 34) · ×1
  • ApiHandlerWapperBase.TryCommonApiBase (cognitive 34) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:133 — ApiHandlerWapperBase.TryCommonApiBase has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ApiHandlerWapperBase.TryCommonApiBaseAsync (cognitive 33) · ×1
  • ApiHandlerWapperBase.TryCommonApiBaseAsync (cognitive 33) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:287 — ApiHandlerWapperBase.TryCommonApiBaseAsync has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TenPayApiRequest.RequestAsyncCore (cognitive 32) · ×1
  • TenPayApiRequest.RequestAsyncCore (cognitive 32) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:692 — TenPayApiRequest.RequestAsyncCore has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · EntityHelper.ConvertEntityToXml (cognitive 27) · ×1
  • EntityHelper.ConvertEntityToXml (cognitive 27) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Helpers/EntityHelper.cs:324 — EntityHelper.ConvertEntityToXml has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.activate (cognitive 25) · ×1
  • extension.activate (cognitive 25) tools/WeixinDev/src/extension.ts:4 — extension.activate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 3, error handling 2 (nesting depth added 4). None of this is in the body itself: all 25 points belong to 3 function literals inside it that branch (lines 44, 8, 23). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · WorkspaceReadTools.SearchText (cognitive 20) · ×1
  • WorkspaceReadTools.SearchText (cognitive 20) tools/Senparc.Weixin.CLI/WorkspaceServices.cs:317 — WorkspaceReadTools.SearchText has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventService.ConfigOnWeixinExceptionFunc (cognitive 19) · ×1
  • EventService.ConfigOnWeixinExceptionFunc (cognitive 19) Samples/All/Senparc.Weixin.Sample.CommonService/EventService.cs:110 — EventService.ConfigOnWeixinExceptionFunc has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RequestMessageFactory.GetRequestEntity (cognitive 18) · ×1
  • RequestMessageFactory.GetRequestEntity (cognitive 18) src/Senparc.Weixin.Work/Senparc.Weixin.Work/RequestMessageFactory.cs:59 — RequestMessageFactory.GetRequestEntity has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WebSocketHandler.HandleMessage (cognitive 18) · ×1
  • WebSocketHandler.HandleMessage (cognitive 18) src/Senparc.WebSocket/src/Senparc.WebSocket/Senparc.WebSocket/Routes/WebSocketHandler/WebSocketHandler_Common.cs:22 — WebSocketHandler.HandleMessage has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessageHandler.Init (cognitive 18) · ×1
  • MessageHandler.Init (cognitive 18) src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:238 — MessageHandler.Init has cognitive complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RequestHandler.CreateMd5Sign (cognitive 18) · ×1
  • RequestHandler.CreateMd5Sign (cognitive 18) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/RequestHandler.cs:199 — RequestHandler.CreateMd5Sign has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomMessageHandler.OnTextRequestAsync (cognitive 18) · ×1
  • CustomMessageHandler.OnTextRequestAsync (cognitive 18) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:125 — CustomMessageHandler.OnTextRequestAsync has cognitive 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 5 function literals inside it that branch (lines 461, 207, 267, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · CustomWxOpenMessageHandler.OnTextRequestAsync (cognitive 18) · ×1
  • CustomWxOpenMessageHandler.OnTextRequestAsync (cognitive 18) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:109 — CustomWxOpenMessageHandler.OnTextRequestAsync has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TenPayApiResultCode.TryGetCode (cognitive 18) · ×1
  • TenPayApiResultCode.TryGetCode (cognitive 18) REDACTED:124 — TenPayApiResultCode.TryGetCode has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · TenPayV3Controller.PayNotifyUrl (cognitive 17) · ×1
  • TenPayV3Controller.PayNotifyUrl (cognitive 17) REDACTED:414 — TenPayV3Controller.PayNotifyUrl 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D32 · Data Compliance (PII/GDPR) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: DefaultWorkMessageContext.cs ↔ WorkMessageHandler.cs src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:1 — `src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs` and `src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/WorkMessageHandler.cs` change together 57% of the time (13 of the 23 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 13 shared commits counted here, the most recent 3 are `a682db6c` 添加通用模板卡片右上角菜单事件推送; 修复不正确的通用模板卡片事件推送类型;; `0fb36137` 企业微信增加:模板卡片点击回调事件; `43dfc359` 企业微信中间件增加:会话存档-产生会话回调事件回调; — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (59 shared lines) · ×1
  • Near-duplicate member pair (59 shared lines) src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:140 — src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:140-265 | src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/ApiHandlerWapper/ApiHandlerWapperBase.cs:294-416 — These two members are variants of one another: 59 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 · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:123 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:123-196 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:121-224 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (30 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (30 members, 50+ identical tokens) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:313 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:313-321 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:415-422 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:431-440 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:450-458 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:466-476 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:650-658 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:668-677 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:764-772 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:780-790 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:800-808 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:817-830 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:839-847 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:855-864 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:874-882 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1040-1050 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1086-1094 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1181-1189 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1199-1208 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1217-1225 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1235-1244 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1254-1261 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1271-1280 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1337-1345 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1353-1362 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1371-1379 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1387-1395 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1404-1412 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1420-1429 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1439-1447 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1605-1614 — These 30 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 30 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 30 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) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:124 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:124-149 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:170-195 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:216-241 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:265-292 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:313-338 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:359-401 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:423-457 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:683-719 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:739-764 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:785-810 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:834-861 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:882-907 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:928-969 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:990-1021 — 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 (13 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (13 members, 50+ identical tokens) REDACTED:63 — REDACTED:63-91 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:151-174 | REDACTED:144-166 | REDACTED:198-217 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs:152-174 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs:225-244 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:180-203 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:211-229 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:237-263 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:251-272 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/RequestHandler.cs:200-258 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/RequestHandler.cs:270-299 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:277-298 — These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times.
D4 · Code Duplication · Duplicated block (129 lines × 2) · ×1
  • Duplicated block (129 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:127 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:127-255 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:2365-2493 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (122 lines × 2) · ×1
  • Duplicated block (122 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs:95 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs:95-216 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs:95-216 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 300 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (111 lines × 2) · ×1
  • Duplicated block (111 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs:93 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs:93-203 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponsReturnJson.cs:155-265 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponsReturnJson.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (107–108 lines × 2) · ×1
  • Duplicated block (107–108 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs:92 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs:92-199 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:96-202 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (104 lines × 2) · ×1
  • Duplicated block (104 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandMemberCard/BrandMemberCardModels.cs:36 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandMemberCard/BrandMemberCardModels.cs:36-139 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandMemberCard/BrandMemberCardModels.cs:364-467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (96 lines × 2) · ×1
  • Duplicated block (96 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs:116 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs:116-211 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/GroupMessage/GroupMessageApi.cs:672-767 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (58–96 lines × 2) · ×1
  • Duplicated block (58–96 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingJson.cs:77 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingJson.cs:77-172 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingManagementJson.cs:143-200 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (83 lines × 3) · ×1
  • Duplicated block (83 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateUniqueThresholdActivityRequestData.cs:123 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateUniqueThresholdActivityRequestData.cs:123-205 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivitiesReturnJson.cs:251-333 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivityReturnJson.cs:210-292 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateUniqueThresholdActivityRequestData.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivityReturnJson.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30–82 lines × 2) · ×1
  • Duplicated block (30–82 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/ReturnJson/OrderReturnJson.cs:47 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/ReturnJson/OrderReturnJson.cs:47-128 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MiniProgramPay/MiniProgramPayJson.cs:519-548 — 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/ReturnJson/OrderReturnJson.cs: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.
D4 · Code Duplication · Duplicated block (81 lines × 2) · ×1
  • Duplicated block (81 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs:429 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs:429-509 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs:439-519 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 300 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (80 lines × 2) · ×1
  • Duplicated block (80 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:119 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs:119-198 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs:119-198 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (74–75 lines × 2) · ×1
  • Duplicated block (74–75 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:93 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:93-166 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:95-169 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (68–73 lines × 2) · ×1
  • Duplicated block (68–73 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivitiesReturnJson.cs:133 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivitiesReturnJson.cs:133-205 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivityReturnJson.cs:81-148 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivitiesReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPaygiftActivityReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (71 lines × 2) · ×1
  • Duplicated block (71 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/MedicalInsurance/MedicalInsuranceModels.cs:101 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/MedicalInsurance/MedicalInsuranceModels.cs:101-171 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/MedicalInsurance/MedicalInsuranceModels.cs:221-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (62–72 lines × 2) · ×1
  • Duplicated block (62–72 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/ReturnJson/CombineOrderReturnJson.cs:108 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/ReturnJson/CombineOrderReturnJson.cs:108-179 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/ReturnJson/EcommerceReturnJson.cs:249-310 — 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/ReturnJson/CombineOrderReturnJson.cs:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (63–69 lines × 4) · ×1
  • Duplicated block (63–69 lines × 4) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/CompleteServiceOrderReturnJson.cs:122 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/CompleteServiceOrderReturnJson.cs:122-184 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:130-194 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:132-198 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/SyncPayServiceOrderReturnJson.cs:139-207 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (56–64 lines × 2) · ×1
  • Duplicated block (56–64 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateData.cs:202 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateData.cs:202-257 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/CardUpdateData.cs:84-147 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateData.cs` and `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/CardUpdateData.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (61 lines × 3) · ×1
  • Duplicated block (61 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/NotifyJson/StockNotifyJson.cs:72 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/NotifyJson/StockNotifyJson.cs:72-132 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryCouponReturnJson.cs:66-126 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryCouponsReturnJson.cs:93-153 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryCouponReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryCouponsReturnJson.cs` as WHOLE FILES: 95% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (57–60 lines × 5) · ×1
  • Duplicated block (57–60 lines × 5) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:168 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:168-225 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/CreateServiceOrderReturnJson.cs:149-205 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:159-218 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:162-219 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/SyncPayServiceOrderReturnJson.cs:171-230 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (59 lines × 4) · ×1
  • Duplicated block (59 lines × 4) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/NotifyJson/PayNotifyJson.cs:250 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/NotifyJson/PayNotifyJson.cs:250-308 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/RequestData/PayParkingRequestData.cs:239-297 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs:248-306 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs:248-306 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/PayParkingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/ReturnJson/QueryParkingReturnJson.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 300 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25–59 lines × 3) · ×1
  • Duplicated block (25–59 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/NotifyJson/RefundNotifyJson.cs:52 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/NotifyJson/RefundNotifyJson.cs:52-110 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/ReturnJson/EcommerceRefundReturnJson.cs:242-282 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MiniProgramPay/MiniProgramPayJson.cs:785-809 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (58–59 lines × 2) · ×1
  • Duplicated block (58–59 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateBusifavorStockRequestData.cs:86 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateBusifavorStockRequestData.cs:86-144 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorStockReturnJson.cs:89-146 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateBusifavorStockRequestData.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorStockReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (54–56 lines × 2) · ×1
  • Duplicated block (54–56 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:65 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:65-118 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:353-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.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.
D4 · Code Duplication · Duplicated block (51–55 lines × 2) · ×1
  • Duplicated block (51–55 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3Info.cs:56 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/TenPayV3Info.cs:56-110 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayV3Info.cs:72-122 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (47 lines × 3) · ×1
  • Duplicated block (47 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.cs:199 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.cs:199-245 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryProfitsharingReturnJson.cs:169-215 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/UnfreezeProfitsharingReturnJson.cs:144-190 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryProfitsharingReturnJson.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.
D4 · Code Duplication · Duplicated block (51–52 lines × 2) · ×1
  • Duplicated block (51–52 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/RequestData/CompleteServiceOrderRequestData.cs:86 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/RequestData/CompleteServiceOrderRequestData.cs:86-136 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/RequestData/ModifyServiceOrderRequestData.cs:72-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.
D4 · Code Duplication · Duplicated block (41–50 lines × 2) · ×1
  • Duplicated block (41–50 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryJson/AddOrderModel.cs:85 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryJson/AddOrderModel.cs:85-125 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WeixinExpress/WeixinExpressReturnJson.cs:101-150 — 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 `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryJson/AddOrderModel.cs:85` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (49 lines × 3) · ×1
  • Duplicated block (49 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs:377 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs:377-425 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponsReturnJson.cs:459-507 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorStockReturnJson.cs:306-354 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponsReturnJson.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (48 lines × 6) · ×1
  • Duplicated block (48 lines × 6) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs:159 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs:159-207 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs:162-209 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/CreateServiceOrderReturnJson.cs:142-191 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/ModifyServiceOrderReturnJson.cs:153-202 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/QueryServiceOrderReturnJson.cs:155-205 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/ReturnJson/SyncPayServiceOrderReturnJson.cs:164-215 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/ConfirmServiceOrderNotifyJson.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/PayScore/Entities/NotifyJson/PayServiceOrderNotifyJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (48 lines × 4) · ×1
  • Duplicated block (48 lines × 4) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateBusifavorStockRequestData.cs:214 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateBusifavorStockRequestData.cs:214-261 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs:302-349 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponsReturnJson.cs:384-431 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorStockReturnJson.cs:231-278 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateBusifavorStockRequestData.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorStockReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31–47 lines × 2) · ×1
  • Duplicated block (31–47 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalJson/GetExternalContactInfoBatchResult.cs:48 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalJson/GetExternalContactInfoBatchResult.cs:48-78 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/GetExternalContactResult.cs:138-184 — 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 `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/ExternalJson/GetExternalContactInfoBatchResult.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.
D4 · Code Duplication · Duplicated block (45–46 lines × 2) · ×1
  • Duplicated block (45–46 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1035 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1035-1079 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:3201-3246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardAPI.cs:1035` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (45 lines × 3) · ×1
  • Duplicated block (45 lines × 3) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/AddOrderModel.cs:22 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/AddOrderModel.cs:22-66 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/PreAddOrderModel.cs:17-61 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/ReOrderModel.cs:22-66 — before extracting anything, compare `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/AddOrderModel.cs` and `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/PreAddOrderModel.cs` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (44–45 lines × 2) · ×1
  • Duplicated block (44–45 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:376 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:376-419 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:912-956 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:376` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (37–44 lines × 2) · ×1
  • Duplicated block (37–44 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateData.cs:419 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateData.cs:419-462 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/BaseCardDetails.cs:250-286 — 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateData.cs:419` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (37–43 lines × 2) · ×1
  • Duplicated block (37–43 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/OAuthAPIs/OAuthJson/OAuthUserInfo.cs:24 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/OAuthAPIs/OAuthJson/OAuthUserInfo.cs:24-60 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/QRConnect/QRConnectJson/QRConnectUserInfo.cs:24-66 — 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 `src/Senparc.Weixin.Open/Senparc.Weixin.Open/OAuthAPIs/OAuthJson/OAuthUserInfo.cs:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (42–43 lines × 2) · ×1
  • Duplicated block (42–43 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:133 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:133-175 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:205-246 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.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.
D4 · Code Duplication · Duplicated block (19–41 lines × 5) · ×1
  • Duplicated block (19–41 lines × 5) REDACTED:57 — REDACTED:57-97 | REDACTED:38-78 | REDACTED:57-97 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageContexts/DefaultMpMessageContext.cs:60-78 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:78-96 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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. The matched lines also transfer control out of the body holding them, 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 `requestType` to `*/RequestMsgType` in one and `RequestMsgType` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageContexts/DefaultMpMessageContext.cs:79` calls `RequestMessageLink` and `src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs:97` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (31–41 lines × 4) · ×1
  • Duplicated block (31–41 lines × 4) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformData.cs:156 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformData.cs:156-196 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformResultJson.cs:190-224 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/InvoiceBatchJson.cs:93-123 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/InvoiceData.cs:59-99 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformData.cs` and `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/InvoiceData.cs` as WHOLE FILES: 90% 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25–41 lines × 2) · ×1
  • Duplicated block (25–41 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBaseBatch/CloudBaseBatchModels.cs:135 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudBaseBatch/CloudBaseBatchModels.cs:135-159 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudRun/CloudRunJsonResults.cs:147-187 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (33–40 lines × 3) · ×1
  • Duplicated block (33–40 lines × 3) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/PreAddOrderModel.cs:65 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/PreAddOrderModel.cs:65-97 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/PreAddOrderModel.cs:101-133 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/ImmediateDelivery/ImmediateDeliveryJson.cs:149-188 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Express/ExpressJson/PreAddOrderModel.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.
D4 · Code Duplication · Duplicated block (39–40 lines × 2) · ×1
  • Duplicated block (39–40 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:521 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:521-559 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:1060-1099 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:521` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (24–40 lines × 2) · ×1
  • Duplicated block (24–40 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MedicalAssistant/MedicalAssistantJson.cs:91 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MedicalAssistant/MedicalAssistantJson.cs:91-130 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/CityService/CityServiceJson.cs:230-253 — 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MedicalAssistant/MedicalAssistantJson.cs:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (37–39 lines × 2) · ×1
  • Duplicated block (37–39 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/BaseCardUpdateInfo.cs:171 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/BaseCardUpdateInfo.cs:171-209 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/Common/Card_BaseInfo/Card_BaseInfoBase.cs:179-215 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (33–34 lines × 3) · ×1
  • Duplicated block (33–34 lines × 3) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/DataCube/DataCubeJson/GetWeAnalysisAppidDailyVisitTrendResultJson.cs:54 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/DataCube/DataCubeJson/GetWeAnalysisAppidDailyVisitTrendResultJson.cs:54-86 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/DataCube/DataCubeJson/GetWeAnalysisAppidMonthlyVisitTrendResultJson.cs:51-84 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/DataCube/DataCubeJson/GetWeAnalysisAppidWeeklyVisitTrendResultJson.cs:51-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/DataCube/DataCubeJson/GetWeAnalysisAppidDailyVisitTrendResultJson.cs:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (32 lines × 4) · ×1
  • Duplicated block (32 lines × 4) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Analysis/AnalysisResultJson/ArticleAnalysisItemJson.cs:65 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Analysis/AnalysisResultJson/ArticleAnalysisItemJson.cs:65-96 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Analysis/AnalysisResultJson/ArticleAnalysisItemJson.cs:138-169 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Analysis/AnalysisResultJson/ArticleAnalysisItemJson.cs:207-238 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Analysis/AnalysisResultJson/ArticleAnalysisItemJson.cs:258-289 — 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.
D4 · Code Duplication · Duplicated block (27–33 lines × 4) · ×1
  • Duplicated block (27–33 lines × 4) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:153 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:153-180 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:225-251 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:420-452 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/ShakeRedPackApi.cs:178-204 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:153` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (31 lines × 3) · ×1
  • Duplicated block (31 lines × 3) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformResultJson.cs:92 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformResultJson.cs:92-122 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformResultJson.cs:142-172 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Invoice/InvoiceJson/InvoiceResultJson.cs:22-52 — 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.
D4 · Code Duplication · Duplicated block (31–32 lines × 2) · ×1
  • Duplicated block (31–32 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/OAuth/OAuthJson/OAuthAccessTokenResult.cs:57 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/OAuth/OAuthJson/OAuthAccessTokenResult.cs:57-88 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/OAuthAPIs/OAuthJson/OAuthAccessTokenResult.cs:27-57 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/OAuth/OAuthJson/OAuthAccessTokenResult.cs` and `src/Senparc.Weixin.Open/Senparc.Weixin.Open/OAuthAPIs/OAuthJson/OAuthAccessTokenResult.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/OAuth/OAuthJson/OAuthAccessTokenResult.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.
D4 · Code Duplication · Duplicated block (29 lines × 3) · ×1
  • Duplicated block (29 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandMemberCard/BrandMemberCardModels.cs:111 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandMemberCard/BrandMemberCardModels.cs:111-139 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandMemberCard/BrandMemberCardModels.cs:192-220 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandMemberCard/BrandMemberCardModels.cs:439-467 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (29–31 lines × 2) · ×1
  • Duplicated block (29–31 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:483 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:483-511 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:731-761 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.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.
D4 · Code Duplication · Duplicated block (27 lines × 3) · ×1
  • Duplicated block (27 lines × 3) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/CardManageResultJson.cs:189 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/CardManageResultJson.cs:189-215 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/CardManageResultJson.cs:250-276 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/CardManageResultJson.cs:373-399 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (26–29 lines × 3) · ×1
  • Duplicated block (26–29 lines × 3) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/OAuth/OAuthJson/OAuthUserInfo.cs:55 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/OAuth/OAuthJson/OAuthUserInfo.cs:55-83 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/OAuthAPIs/OAuthJson/OAuthUserInfo.cs:26-51 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/QRConnect/QRConnectJson/QRConnectUserInfo.cs:29-57 — before extracting anything, compare `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/OAuth/OAuthJson/OAuthUserInfo.cs` and `src/Senparc.Weixin.Open/Senparc.Weixin.Open/OAuthAPIs/OAuthJson/OAuthUserInfo.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28–29 lines × 2) · ×1
  • Duplicated block (28–29 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs:212 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs:212-239 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/Verifier/SHA256WithRSAVerifier.cs:57-85 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/Verifier/SHA256WithRSAVerifier.cs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs:212` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:459 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:459-482 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:1154-1176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentApi.cs:459` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–24 lines × 2) · ×1
  • Duplicated block (18–24 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3UnifiedorderRequestData.cs:361 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3UnifiedorderRequestData.cs:361-378 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:678-701 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (21–24 lines × 2) · ×1
  • Duplicated block (21–24 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs:88 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Helpers/TenPaySignHelper.cs:88-111 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/Signer/SHA256WithRSASigner.cs:14-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (22–23 lines × 3) · ×1
  • Duplicated block (22–23 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:525 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:525-546 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:802-824 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/TenPayHttpClient.cs:199-220 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/HttpHandlers/TenPayApiRequest.cs:525` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Webhook/WebhookApi.cs:82 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Webhook/WebhookApi.cs:82-104 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Webhook/WebhookApi.cs:304-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Webhook/WebhookApi.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) src/Senparc.Weixin/Senparc.Weixin/Utilities/HttpUtility/Post.cs:98 — src/Senparc.Weixin/Senparc.Weixin/Utilities/HttpUtility/Post.cs:98-119 | src/Senparc.Weixin/Senparc.Weixin/Utilities/HttpUtility/Post.cs:132-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin/Senparc.Weixin/Utilities/HttpUtility/Post.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.
D4 · Code Duplication · Duplicated block (16–21 lines × 4) · ×1
  • Duplicated block (16–21 lines × 4) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:133 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:133-153 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:205-225 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:401-420 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:741-756 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.cs:398` calls `SetParameter` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/RedPackApi.Via.cs:130` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (18–21 lines × 3) · ×1
  • Duplicated block (18–21 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:170 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:170-187 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:313-330 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:557-577 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/ShakeRedPackApi.cs:217 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/ShakeRedPackApi.cs:217-233 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/ShakeRedPackApi.cs:244-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/RedPackApi/ShakeRedPackApi.cs:244` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–17 lines × 3) · ×1
  • Duplicated block (14–17 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3GetTransferInfoRequestData.cs:95 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3GetTransferInfoRequestData.cs:95-109 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3PayToWorkerRequestData.cs:188-204 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3ReverseRequestData.cs:111-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 all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3ReverseRequestData.cs:126` calls `SetParameter` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenPayV3GetTransferInfoRequestData.cs:111` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:159 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:159-175 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:185-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Helpers/EncryptHelper.cs:159` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/ChainBrandProfitsharing/ChainBrandProfitsharingApis.cs:376 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/ChainBrandProfitsharing/ChainBrandProfitsharingApis.cs:376-392 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Security/SecurityEchoApis.cs:97-111 — 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.
D4 · Code Duplication · Duplicated block (13–15 lines × 6) · ×1
  • Duplicated block (13–15 lines × 6) src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:721 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:721-734 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:769-782 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:826-838 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:886-900 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:948-962 | src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:999-1012 — 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 `src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Custom/CustomApi.cs:721` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×1
  • Duplicated block (14–15 lines × 3) REDACTED:71 — REDACTED:71-85 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:155-168 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:184-197 — before extracting anything, compare `REDACTED` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.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.
D4 · Code Duplication · Duplicated block (11–15 lines × 2) · ×1
  • Duplicated block (11–15 lines × 2) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:131 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:131-141 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.cs:207-221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppApi.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.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:137 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:137-149 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:183-195 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:229-241 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:280-292 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:326-338 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:445-457 — 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 `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.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.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:707 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:707-719 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:752-764 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:798-810 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:849-861 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:895-907 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:707` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 6) · ×1
  • Duplicated block (11–12 lines × 6) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:708 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:708-719 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:753-764 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:799-810 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:850-861 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:896-907 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:959-969 — 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 `src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/MassApi.cs:708` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–12 lines × 2) · ×1
  • Duplicated block (7–12 lines × 2) src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/CommonApi.cs:234 — src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/CommonApi.cs:234-245 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/OpenAPIs/OpenApi.cs:112-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10–11 lines × 10) · ×1
  • Duplicated block (10–11 lines × 10) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:151 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:151-161 | REDACTED:144-154 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs:152-162 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:180-190 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:211-220 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:237-246 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:251-261 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/RequestHandler.cs:200-210 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/RequestHandler.cs:270-280 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:277-287 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs` as WHOLE FILES: this scan already matched 5 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:151` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 6) · ×1
  • Duplicated block (9–10 lines × 6) src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:218 — src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:218-226 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:236-245 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:255-264 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:274-283 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:293-302 | src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.cs:312-321 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `SendTextData` in one and `SendImageData` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8–10 lines × 6) · ×1
  • Duplicated block (8–10 lines × 6) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:291 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:291-300 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:332-340 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:582-589 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:606-613 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:631-638 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1064-1073 — 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. 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 `dataInfo` to `TenPayV3GetSignKeyRequestData` in one and `TenPayV3UnifiedorderRequestData` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (7–9 lines × 4) · ×1
  • Duplicated block (7–9 lines × 4) src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainJson/GetEffectiveDomainResultJson.cs:49 — src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainJson/GetEffectiveDomainResultJson.cs:49-55 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainJson/ModifyDomainDirectlyResultJson.cs:41-49 | src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainJson/ModifyDomainResultJson.cs:41-49 | src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Operation/OperationJson/OperationModels.cs:24-30 — before extracting anything, compare `src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainJson/ModifyDomainDirectlyResultJson.cs` and `src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainJson/ModifyDomainResultJson.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 `src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Domain/DomainJson/GetEffectiveDomainResultJson.cs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) REDACTED:78 — REDACTED:78-84 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:161-167 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:190-196 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:261-267 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:287-293 — before extracting anything, compare `REDACTED` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.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 `REDACTED: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.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×1
  • Duplicated block (8 lines × 5) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:182 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:182-189 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:325-332 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:461-468 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:572-579 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:697-704 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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 `receiver` to `TenpayV3ProfitShareingAddReceiverRequestData_ReceiverInfo` in one and `TenpayV3ProfitShareing_ReceiverInfo` 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, `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:696` calls `SetParameterWhenNotNull` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/Entities/Request/TenpayV3ProfitShareingRequestData.cs:178` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:790 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:790-796 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:840-846 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:923-929 — 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 `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/BasePayApis.cs:790` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×1
  • Duplicated block (5 lines × 6) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:434 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:434-438 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:470-474 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:671-675 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:784-788 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:858-862 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1044-1048 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1201 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1201-1207 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1237-1243 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1273-1279 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1355-1361 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1422-1428 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1607-1613 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `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 `dataInfo` to `TenPayV3OrderQueryRequestData` in one and `TenPayV3CloseOrderRequestData` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6 lines × 14) · ×1
  • Duplicated block (6 lines × 14) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:432 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:432-437 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:467-473 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:669-674 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:781-787 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:818-823 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:856-861 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1041-1047 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1200-1205 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1236-1241 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1272-1277 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1354-1359 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1388-1393 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1421-1426 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1606-1611 — all 14 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `dataInfo` to `TenPayV3OrderQueryRequestData` in one and `TenPayV3CloseOrderRequestData` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6 lines × 9) · ×1
  • Duplicated block (6 lines × 9) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1087 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1087-1093 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1182-1188 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1218-1224 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1255-1260 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1338-1344 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1372-1378 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1389-1394 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1405-1411 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1440-1446 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1389` calls `ParseXML` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/Universal/TenPayV3.cs:1087` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×1
  • Duplicated block (10 lines × 7) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:194 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs:194-203 | REDACTED:128-137 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RefundResponseHandler.cs:136-145 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs:134-143 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ResponseHandler.cs:235-244 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/RequestHandler.cs:166-175 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V3/ResponseHandler.cs:261-270 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/ClientRequestHandler.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/V2/RequestHandler.cs` as WHOLE FILES: this scan already matched 5 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateBusifavorStockRequestData.cs:819 — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateBusifavorStockRequestData.cs:819-824 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/ModifyBusifavorStockInformationRequestData.cs:280-285 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorCouponReturnJson.cs:219-224 | src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorStockReturnJson.cs:855-860 — before extracting anything, compare `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/RequestData/CreateBusifavorStockRequestData.cs` and `src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryBusifavorStockReturnJson.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Near-duplicate member family (7 members, 18 shared lines) · ×1
  • Near-duplicate member family (7 members, 18 shared lines) REDACTED:240 — REDACTED:240-291 | REDACTED:1006-1042 | REDACTED:41-140 | REDACTED:240-291 | REDACTED:1006-1042 | REDACTED:321-371 | REDACTED:1010-1046 — These 7 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 39 shared lines) · ×1
  • Near-duplicate member family (4 members, 39 shared lines) REDACTED:862 — REDACTED:862-915 | REDACTED:815-868 | REDACTED:862-915 | REDACTED:866-919 — These 4 members are variants of one another: a block of 39 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 36 shared lines) · ×1
  • Near-duplicate member family (4 members, 36 shared lines) REDACTED:921 — REDACTED:921-963 | REDACTED:874-916 | REDACTED:921-963 | REDACTED:925-967 — These 4 members are variants of one another: a block of 36 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member pair (117 shared lines) · ×1
  • Near-duplicate member pair (117 shared lines) REDACTED:37 — REDACTED:37-160 | REDACTED:37-160 — These two members are variants of one another: 117 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (50 shared lines) · ×1
  • Near-duplicate member pair (50 shared lines) REDACTED:45 — REDACTED:45-148 | REDACTED:44-146 — These two members are variants of one another: 50 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 · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) REDACTED:173 — REDACTED:173-195 | REDACTED:173-195 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (21 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (21 members, 50+ identical tokens) REDACTED:264 — REDACTED:264-326 | REDACTED:427-483 | REDACTED:486-514 | REDACTED:168-233 | REDACTED:1057-1143 | REDACTED:1146-1174 | REDACTED:144-207 | REDACTED:993-1077 | REDACTED:1080-1108 | REDACTED:264-326 | REDACTED:427-483 | REDACTED:486-514 | REDACTED:168-233 | REDACTED:1057-1143 | REDACTED:1146-1174 | REDACTED:164-229 | REDACTED:1061-1147 | REDACTED:1150-1178 | REDACTED:255-315 | REDACTED:398-454 | REDACTED:457-485 — These 21 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 21 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 21 times.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) REDACTED:87 — REDACTED:87-162 | REDACTED:135-203 | REDACTED:120-201 | REDACTED:64-136 | REDACTED:63-130 | REDACTED:87-162 | REDACTED:135-203 | REDACTED:79-152 | REDACTED:75-136 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Duplicated block (259 lines × 2) · ×1
  • Duplicated block (259 lines × 2) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:228 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:228-486 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:214-472 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 433 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:228` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (220 lines × 2) · ×1
  • Duplicated block (220 lines × 2) REDACTED:57 — REDACTED:57-276 | REDACTED:57-276 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 561 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (123 lines × 3) · ×1
  • Duplicated block (123 lines × 3) REDACTED:57 — REDACTED:57-179 | REDACTED:38-160 | REDACTED:57-179 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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. The matched lines also transfer control out of the body holding them, 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 `requestType` to `*/RequestMsgType` in one and `RequestMsgType` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (103 lines × 2) · ×1
  • Duplicated block (103 lines × 2) REDACTED:46 — REDACTED:46-148 | REDACTED:46-148 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (97 lines × 2) · ×1
  • Duplicated block (97 lines × 2) REDACTED:349 — REDACTED:349-445 | REDACTED:349-445 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 561 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (93 lines × 2) · ×1
  • Duplicated block (93 lines × 2) REDACTED:153 — REDACTED:153-245 | REDACTED:153-245 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (86 lines × 2) · ×1
  • Duplicated block (86 lines × 2) REDACTED:351 — REDACTED:351-436 | REDACTED:351-436 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (83 lines × 2) · ×1
  • Duplicated block (83 lines × 2) Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:115 — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:115-197 | Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:101-183 — before extracting anything, compare `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs` and `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 433 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:115` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (78 lines × 3) · ×1
  • Duplicated block (78 lines × 3) REDACTED:715 — REDACTED:715-792 | REDACTED:715-792 | REDACTED:719-796 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (75–76 lines × 2) · ×1
  • Duplicated block (75–76 lines × 2) REDACTED:83 — REDACTED:83-158 | REDACTED:66-140 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:83` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (74–76 lines × 2) · ×1
  • Duplicated block (74–76 lines × 2) REDACTED:87 — REDACTED:87-162 | REDACTED:79-152 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (73 lines × 3) · ×1
  • Duplicated block (73 lines × 3) REDACTED:494 — REDACTED:494-566 | REDACTED:494-566 | REDACTED:407-479 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (69 lines × 2) · ×1
  • Duplicated block (69 lines × 2) REDACTED:163 — REDACTED:163-231 | REDACTED:163-231 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:163` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (67 lines × 3) · ×1
  • Duplicated block (67 lines × 3) REDACTED:373 — REDACTED:373-439 | REDACTED:373-439 | REDACTED:453-519 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (61 lines × 2) · ×1
  • Duplicated block (61 lines × 2) REDACTED:84 — REDACTED:84-144 | REDACTED:84-144 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (58 lines × 3) · ×1
  • Duplicated block (58 lines × 3) REDACTED:46 — REDACTED:46-103 | REDACTED:46-103 | REDACTED:46-103 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:46` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (60 lines × 2) · ×1
  • Duplicated block (60 lines × 2) REDACTED:340 — REDACTED:340-399 | REDACTED:340-399 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 462 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (56 lines × 2) · ×1
  • Duplicated block (56 lines × 2) REDACTED:150 — REDACTED:150-205 | REDACTED:150-205 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (55 lines × 3) · ×1
  • Duplicated block (55 lines × 3) REDACTED:220 — REDACTED:220-274 | REDACTED:220-274 | REDACTED:212-266 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (53 lines × 3) · ×1
  • Duplicated block (53 lines × 3) REDACTED:863 — REDACTED:863-915 | REDACTED:863-915 | REDACTED:867-919 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (51–52 lines × 3) · ×1
  • Duplicated block (51–52 lines × 3) REDACTED:240 — REDACTED:240-291 | REDACTED:240-291 | REDACTED:321-371 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (45–47 lines × 3) · ×1
  • Duplicated block (45–47 lines × 3) REDACTED:75 — REDACTED:75-121 | REDACTED:62-106 | REDACTED:75-121 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (43–45 lines × 2) · ×1
  • Duplicated block (43–45 lines × 2) REDACTED:527 — REDACTED:527-569 | REDACTED:498-542 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (41 lines × 3) · ×1
  • Duplicated block (41 lines × 3) REDACTED:165 — REDACTED:165-205 | REDACTED:165-205 | REDACTED:114-154 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:165` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (42 lines × 3) · ×1
  • Duplicated block (42 lines × 3) REDACTED:922 — REDACTED:922-963 | REDACTED:922-963 | REDACTED:926-967 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (37 lines × 3) · ×1
  • Duplicated block (37 lines × 3) REDACTED:246 — REDACTED:246-282 | REDACTED:295-331 | REDACTED:375-411 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (38–39 lines × 3) · ×1
  • Duplicated block (38–39 lines × 3) REDACTED:101 — REDACTED:101-138 | REDACTED:101-138 | REDACTED:58-96 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:101` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (31–37 lines × 3) · ×1
  • Duplicated block (31–37 lines × 3) REDACTED:514 — REDACTED:514-550 | REDACTED:514-550 | REDACTED:282-312 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:514` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (36 lines × 3) · ×1
  • Duplicated block (36 lines × 3) REDACTED:1007 — REDACTED:1007-1042 | REDACTED:1007-1042 | REDACTED:1011-1046 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (34 lines × 3) · ×1
  • Duplicated block (34 lines × 3) REDACTED:452 — REDACTED:452-485 | REDACTED:452-485 | REDACTED:365-398 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (33 lines × 6) · ×1
  • Duplicated block (33 lines × 6) REDACTED:224 — REDACTED:224-256 | REDACTED:131-163 | REDACTED:224-256 | REDACTED:131-163 | REDACTED:127-159 | REDACTED:215-247 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (30–32 lines × 2) · ×1
  • Duplicated block (30–32 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:523 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:523-554 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:174-203 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28–29 lines × 8) · ×1
  • Duplicated block (28–29 lines × 8) REDACTED:887 — REDACTED:887-915 | REDACTED:936-963 | REDACTED:840-868 | REDACTED:889-916 | REDACTED:887-915 | REDACTED:936-963 | REDACTED:891-919 | REDACTED:940-967 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:887` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (26 lines × 6) · ×1
  • Duplicated block (26 lines × 6) REDACTED:487 — REDACTED:487-512 | REDACTED:1147-1172 | REDACTED:487-512 | REDACTED:1147-1172 | REDACTED:1151-1176 | REDACTED:458-483 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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:487` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) REDACTED:110 — REDACTED:110-136 | REDACTED:105-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:110` 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, `REDACTED:108` calls `Log` and `REDACTED:104` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (25 lines × 7) · ×1
  • Duplicated block (25 lines × 7) REDACTED:487 — REDACTED:487-511 | REDACTED:1147-1171 | REDACTED:1081-1105 | REDACTED:487-511 | REDACTED:1147-1171 | REDACTED:1151-1175 | REDACTED:458-482 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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:487` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) REDACTED:73 — REDACTED:73-97 | REDACTED:76-99 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:73` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) REDACTED:88 — REDACTED:88-111 | REDACTED:86-109 | REDACTED:88-111 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:88` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (16–24 lines × 3) · ×1
  • Duplicated block (16–24 lines × 3) REDACTED:173 — REDACTED:173-188 | REDACTED:173-188 | REDACTED:33-56 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:173` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 6) · ×1
  • Duplicated block (22 lines × 6) REDACTED:428 — REDACTED:428-449 | REDACTED:1058-1079 | REDACTED:428-449 | REDACTED:1058-1079 | REDACTED:1062-1083 | REDACTED:399-420 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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:428` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 4) · ×1
  • Duplicated block (20 lines × 4) REDACTED:177 — REDACTED:177-196 | REDACTED:150-169 | REDACTED:177-196 | REDACTED:126-145 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:177` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21–23 lines × 4) · ×1
  • Duplicated block (21–23 lines × 4) REDACTED:123 — REDACTED:123-145 | REDACTED:97-119 | REDACTED:123-145 | REDACTED:115-135 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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.
D4 · Code Duplication · Duplicated block (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) REDACTED:81 — REDACTED:81-101 | REDACTED:195-217 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:193` calls `ToString`, `BuildRandomStr` and `REDACTED:79` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (20 lines × 9) · ×1
  • Duplicated block (20 lines × 9) REDACTED:138 — REDACTED:138-157 | REDACTED:180-199 | REDACTED:178-197 | REDACTED:112-131 | REDACTED:107-126 | REDACTED:138-157 | REDACTED:180-199 | REDACTED:128-147 | REDACTED:113-132 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:134` calls `Log` and `REDACTED:104` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (21–22 lines × 6) · ×1
  • Duplicated block (21–22 lines × 6) REDACTED:180 — REDACTED:180-201 | REDACTED:1068-1088 | REDACTED:180-201 | REDACTED:1068-1088 | REDACTED:176-197 | REDACTED:1072-1092 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–22 lines × 4) · ×1
  • Duplicated block (20–22 lines × 4) REDACTED:102 — REDACTED:102-121 | REDACTED:214-235 | REDACTED:102-121 | REDACTED:214-235 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:211` calls `ToString`, `BuildRandomStr` and `REDACTED:99` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (21–22 lines × 4) · ×1
  • Duplicated block (21–22 lines × 4) REDACTED:529 — REDACTED:529-550 | REDACTED:516-537 | REDACTED:529-550 | REDACTED:292-312 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:529` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–22 lines × 2) · ×1
  • Duplicated block (20–22 lines × 2) REDACTED:578 — REDACTED:578-597 | REDACTED:517-538 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 454 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:578` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:566 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:566-587 | Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs:215-235 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs` and `Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:566` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (19 lines × 6) · ×1
  • Duplicated block (19 lines × 6) REDACTED:135 — REDACTED:135-153 | REDACTED:978-996 | REDACTED:135-153 | REDACTED:978-996 | REDACTED:982-1000 | REDACTED:126-144 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (18–20 lines × 6) · ×1
  • Duplicated block (18–20 lines × 6) REDACTED:99 — REDACTED:99-116 | REDACTED:164-181 | REDACTED:211-230 | REDACTED:99-116 | REDACTED:164-181 | REDACTED:211-230 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:211` calls `ToString`, `BuildRandomStr` and `REDACTED:99` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19–20 lines × 6) · ×1
  • Duplicated block (19–20 lines × 6) REDACTED:440 — REDACTED:440-458 | REDACTED:182-201 | REDACTED:1070-1088 | REDACTED:178-197 | REDACTED:1074-1092 | REDACTED:411-429 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19–20 lines × 4) · ×1
  • Duplicated block (19–20 lines × 4) REDACTED:87 — REDACTED:87-106 | REDACTED:64-82 | REDACTED:87-106 | REDACTED:79-98 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17–19 lines × 8) · ×1
  • Duplicated block (17–19 lines × 8) REDACTED:440 — REDACTED:440-456 | REDACTED:182-200 | REDACTED:1070-1086 | REDACTED:182-200 | REDACTED:1070-1086 | REDACTED:178-196 | REDACTED:1074-1090 | REDACTED:411-427 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18–19 lines × 5) · ×1
  • Duplicated block (18–19 lines × 5) REDACTED:109 — REDACTED:109-126 | REDACTED:128-146 | REDACTED:109-126 | REDACTED:128-146 | REDACTED:66-84 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:109` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (18 lines × 5) · ×1
  • Duplicated block (18 lines × 5) REDACTED:114 — REDACTED:114-131 | REDACTED:226-243 | REDACTED:133-150 | REDACTED:129-146 | REDACTED:217-234 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 5) · ×1
  • Duplicated block (17 lines × 5) Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:29 — Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:29-45 | REDACTED:1024-1040 | REDACTED:1024-1040 | REDACTED:1028-1044 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Utilities/QrCodeHelper.cs:29-45 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 15) · ×1
  • Duplicated block (15 lines × 15) REDACTED:500 — REDACTED:500-514 | REDACTED:219-233 | REDACTED:1129-1143 | REDACTED:1160-1174 | REDACTED:193-207 | REDACTED:1062-1076 | REDACTED:1094-1108 | REDACTED:500-514 | REDACTED:219-233 | REDACTED:1129-1143 | REDACTED:1160-1174 | REDACTED:215-229 | REDACTED:1133-1147 | REDACTED:1164-1178 | REDACTED:471-485 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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:500` 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, `REDACTED:1126` calls `SetString`, `ToString` and `REDACTED:498` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–17 lines × 8) · ×1
  • Duplicated block (11–17 lines × 8) REDACTED:203 — REDACTED:203-213 | REDACTED:1100-1110 | REDACTED:177-187 | REDACTED:1027-1043 | REDACTED:203-213 | REDACTED:1100-1110 | REDACTED:199-209 | REDACTED:1104-1114 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–16 lines × 11) · ×1
  • Duplicated block (13–16 lines × 11) REDACTED:278 — REDACTED:278-293 | REDACTED:440-452 | REDACTED:182-196 | REDACTED:1070-1082 | REDACTED:278-293 | REDACTED:182-196 | REDACTED:1070-1082 | REDACTED:178-192 | REDACTED:1074-1086 | REDACTED:269-284 | REDACTED:411-423 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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, `REDACTED:452` calls `GetTimestamp`, `GetNoncestr` and `REDACTED:293` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×1
  • Duplicated block (15–16 lines × 3) REDACTED:329 — REDACTED:329-343 | REDACTED:329-343 | REDACTED:300-315 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–15 lines × 12) · ×1
  • Duplicated block (13–15 lines × 12) REDACTED:276 — REDACTED:276-290 | REDACTED:438-450 | REDACTED:180-194 | REDACTED:1068-1080 | REDACTED:276-290 | REDACTED:438-450 | REDACTED:180-194 | REDACTED:1068-1080 | REDACTED:176-190 | REDACTED:1072-1084 | REDACTED:267-281 | REDACTED:409-421 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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, `REDACTED:452` calls `GetTimestamp`, `GetNoncestr` and `REDACTED:293` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×1
  • Duplicated block (15 lines × 6) REDACTED:97 — REDACTED:97-111 | REDACTED:162-176 | REDACTED:443-457 | REDACTED:97-111 | REDACTED:162-176 | REDACTED:443-457 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 652 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) REDACTED:77 — REDACTED:77-91 | REDACTED:148-162 | REDACTED:418-432 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) REDACTED:682 — REDACTED:682-694 | REDACTED:663-677 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:682` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) REDACTED:229 — REDACTED:229-242 | REDACTED:365-377 | REDACTED:966-979 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:229` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) REDACTED:77 — REDACTED:77-89 | REDACTED:144-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–13 lines × 8) · ×1
  • Duplicated block (11–13 lines × 8) Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:23 — Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:23-33 | REDACTED:260-272 | REDACTED:1018-1028 | REDACTED:260-272 | REDACTED:1018-1028 | REDACTED:341-353 | REDACTED:1022-1032 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Utilities/QrCodeHelper.cs:23-33 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–13 lines × 4) · ×1
  • Duplicated block (11–13 lines × 4) REDACTED:309 — REDACTED:309-319 | REDACTED:237-249 | REDACTED:309-319 | REDACTED:280-290 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:309` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) REDACTED:374 — REDACTED:374-386 | REDACTED:354-365 | REDACTED:374-386 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/CustomMessageHandler_AI.cs:352 — Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/CustomMessageHandler_AI.cs:352-364 | Samples/All/Senparc.Weixin.Sample.CommonService/AI/MessageHandlers/CustomMessageHandler_AI.cs:534-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–12 lines × 11) · ×1
  • Duplicated block (11–12 lines × 11) Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:29 — Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:29-40 | REDACTED:268-278 | REDACTED:424-434 | REDACTED:1024-1035 | REDACTED:268-278 | REDACTED:424-434 | REDACTED:1024-1035 | REDACTED:349-359 | REDACTED:504-514 | REDACTED:1028-1039 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Utilities/QrCodeHelper.cs:29-40 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:40` calls `Flush` and `REDACTED:278` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) REDACTED:385 — REDACTED:385-395 | REDACTED:447-458 | REDACTED:531-542 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:385` it does not close everything it opens, so those 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:397` calls `SetParameter` and `REDACTED:460` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 13) · ×1
  • Duplicated block (10–11 lines × 13) Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:29 — Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:29-38 | REDACTED:104-114 | REDACTED:268-277 | REDACTED:424-433 | REDACTED:1024-1033 | REDACTED:86-96 | REDACTED:268-277 | REDACTED:424-433 | REDACTED:1024-1033 | REDACTED:349-358 | REDACTED:504-513 | REDACTED:1028-1037 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Utilities/QrCodeHelper.cs:29-38 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:40` calls `Flush` and `REDACTED:278` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–10 lines × 5) · ×1
  • Duplicated block (9–10 lines × 5) REDACTED:167 — REDACTED:167-175 | REDACTED:193-201 | REDACTED:1079-1088 | REDACTED:189-197 | REDACTED:1083-1092 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:167` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–10 lines × 4) · ×1
  • Duplicated block (8–10 lines × 4) Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:286 — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:286-295 | REDACTED:119-126 | REDACTED:177-185 | REDACTED:204-212 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs:286` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–9 lines × 6) · ×1
  • Duplicated block (8–9 lines × 6) REDACTED:135 — REDACTED:135-143 | REDACTED:184-191 | REDACTED:115-123 | REDACTED:170-177 | REDACTED:135-143 | REDACTED:184-191 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 198 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–9 lines × 5) · ×1
  • Duplicated block (8–9 lines × 5) REDACTED:76 — REDACTED:76-84 | REDACTED:257-264 | REDACTED:1015-1022 | REDACTED:338-345 | REDACTED:1019-1026 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1015` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8–9 lines × 4) · ×1
  • Duplicated block (8–9 lines × 4) REDACTED:47 — REDACTED:47-55 | REDACTED:28-35 | REDACTED:47-55 | REDACTED:39-47 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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.
D4 · Code Duplication · Duplicated block (7 lines × 7) · ×1
  • Duplicated block (7 lines × 7) REDACTED:68 — REDACTED:68-74 | REDACTED:66-72 | REDACTED:45-51 | REDACTED:46-52 | REDACTED:68-74 | REDACTED:66-72 | REDACTED:58-64 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×1
  • Duplicated block (8 lines × 7) REDACTED:257 — REDACTED:257-264 | REDACTED:1015-1022 | REDACTED:76-84 | REDACTED:257-264 | REDACTED:1015-1022 | REDACTED:338-345 | REDACTED:1019-1026 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 1184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1015` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (5 lines × 9) · ×1
  • Duplicated block (5 lines × 9) Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:23 — Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:23-27 | REDACTED:260-264 | REDACTED:1018-1022 | REDACTED:80-84 | REDACTED:260-264 | REDACTED:1018-1022 | REDACTED:341-345 | REDACTED:1022-1026 | Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Utilities/QrCodeHelper.cs:23-27 — before extracting anything, compare `Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs` and `REDACTED` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) REDACTED:149 — REDACTED:149-154 | REDACTED:149-154 | REDACTED:141-146 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 525 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D8 · Code Coverage · Low coverage · ×1
  • Low coverage: src/Senparc.Weixin.MCP.Server/Tools/RandomNumberTools.cs src/Senparc.Weixin.MCP.Server/Tools/RandomNumberTools.cs:1 — 0.0% line coverage (0/13).
D8 · Code Coverage · No test project references Senparc.Weixin.MP.src · ×1
  • No test project references Senparc.Weixin.MP.src src/Senparc.Weixin.MP/Senparc.Weixin.MP/Senparc.Weixin.MP.src.csproj — No test project in this repository references Senparc.Weixin.MP.src (393 production source file(s)), so `dotnet test` never loads it and no coverage tool can measure it — its code is absent from the 77.2% above rather than counted at zero. This is the whole assembly, not a gap within one: add a test project that references it (or a ProjectReference from an existing suite) and its coverage starts being measured.
D8 · Code Coverage · No test project references Senparc.Weixin.WxOpen.Packages · ×1
  • No test project references Senparc.Weixin.WxOpen.Packages src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.Packages.csproj — No test project in this repository references Senparc.Weixin.WxOpen.Packages (312 production source file(s)), so `dotnet test` never loads it and no coverage tool can measure it — its code is absent from the 77.2% above rather than counted at zero. This is the whole assembly, not a gap within one: add a test project that references it (or a ProjectReference from an existing suite) and its coverage starts being measured.
D8 · Code Coverage · No test project references Senparc.Weixin.TenPay · ×1
  • No test project references Senparc.Weixin.TenPay src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay.csproj — No test project in this repository references Senparc.Weixin.TenPay (63 production source file(s)), so `dotnet test` never loads it and no coverage tool can measure it — its code is absent from the 77.2% above rather than counted at zero. This is the whole assembly, not a gap within one: add a test project that references it (or a ProjectReference from an existing suite) and its coverage starts being measured.
D8 · Code Coverage · No test project references Senparc.WebSocket.packages · ×1
  • No test project references Senparc.WebSocket.packages src/Senparc.WebSocket/src/Senparc.WebSocket/Senparc.WebSocket/Senparc.WebSocket.packages.csproj — No test project in this repository references Senparc.WebSocket.packages (12 production source file(s)), so `dotnet test` never loads it and no coverage tool can measure it — its code is absent from the 77.2% above rather than counted at zero. This is the whole assembly, not a gap within one: add a test project that references it (or a ProjectReference from an existing suite) and its coverage starts being measured.
D8 · Code Coverage · No test project references Senparc.Weixin.Cache.Redis.src · ×1
  • No test project references Senparc.Weixin.Cache.Redis.src src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/Senparc.Weixin.Cache.Redis.src.csproj — No test project in this repository references Senparc.Weixin.Cache.Redis.src (7 production source file(s)), so `dotnet test` never loads it and no coverage tool can measure it — its code is absent from the 77.2% above rather than counted at zero. This is the whole assembly, not a gap within one: add a test project that references it (or a ProjectReference from an existing suite) and its coverage starts being measured.
D8 · Code Coverage · No test project references Senparc.Weixin.CLI · ×1
  • No test project references Senparc.Weixin.CLI tools/Senparc.Weixin.CLI/Senparc.Weixin.CLI.csproj — No test project in this repository references Senparc.Weixin.CLI (6 production source file(s)), so `dotnet test` never loads it and no coverage tool can measure it — its code is absent from the 77.2% above rather than counted at zero. This is the whole assembly, not a gap within one: add a test project that references it (or a ProjectReference from an existing suite) and its coverage starts being measured.
D8 · Code Coverage · No test project references Senparc.Weixin.Cache.Memcached · ×1
  • No test project references Senparc.Weixin.Cache.Memcached src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Memcached/Senparc.Weixin.Cache.Memcached.csproj — No test project in this repository references Senparc.Weixin.Cache.Memcached (4 production source file(s)), so `dotnet test` never loads it and no coverage tool can measure it — its code is absent from the 77.2% above rather than counted at zero. This is the whole assembly, not a gap within one: add a test project that references it (or a ProjectReference from an existing suite) and its coverage starts being measured.
D8 · Code Coverage · No test project references Senparc.Weixin.Cache.Memcached.src · ×1
  • No test project references Senparc.Weixin.Cache.Memcached.src src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Memcached/Senparc.Weixin.Cache.Memcached.src.csproj — No test project in this repository references Senparc.Weixin.Cache.Memcached.src (4 production source file(s)), so `dotnet test` never loads it and no coverage tool can measure it — its code is absent from the 77.2% above rather than counted at zero. This is the whole assembly, not a gap within one: add a test project that references it (or a ProjectReference from an existing suite) and its coverage starts being measured.
D8 · Code Coverage · No test project references Senparc.Weixin.Benchmarks · ×1
  • No test project references Senparc.Weixin.Benchmarks benchmarks/Senparc.Weixin.Benchmarks/Senparc.Weixin.Benchmarks.csproj — No test project in this repository references Senparc.Weixin.Benchmarks (1 production source file(s)), so `dotnet test` never loads it and no coverage tool can measure it — its code is absent from the 77.2% above rather than counted at zero. This is the whole assembly, not a gap within one: add a test project that references it (or a ProjectReference from an existing suite) and its coverage starts being measured.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 4 typed · 24 plain JS — the untyped files are src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/app.js, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/LivePusher/LivePusher.js, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/Login/Login.js, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/QrCode/QrCode.js, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/logs/logs.js (+18 more).
R10 · Code Duplication · Forked directory tree (36 identical files, ~9924 lines × 2 trees) · ×1
  • Forked directory tree (36 identical files, ~9924 lines × 2 trees) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/utils/signalr.test.js:1 — Samples/WxOpen/Senparc.Weixin.WxOpen.AppDemo/ and src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/ are near-verbatim copies of each other: 36 files are byte-identical under the same relative paths (~9924 lines; the trees hold 43 and 70 files). That is one structural fact, not 36 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
R10 · Code Duplication · Wholesale file copy (392 identical lines × 2 files) · ×1
  • Wholesale file copy (392 identical lines × 2 files) src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:2 — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:2 · src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js:2 — these 2 files are line-for-line copies of one another — 392 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (201 identical lines × 2 files) · ×1
  • Wholesale file copy (201 identical lines × 2 files) src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/components/create/createstep.js:3 — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/components/create/createstep.js:3 · src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/components/create/createstep.js:3 — these 2 files are line-for-line copies of one another — 201 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (101 identical lines × 2 files) · ×1
  • Wholesale file copy (101 identical lines × 2 files) src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/stores/projectStores.js:3 — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/stores/projectStores.js:3 · src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/stroes/projectStores.js:3 — these 2 files are line-for-line copies of one another — 101 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (44 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (44 matched lines × 2 locations) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/websocket/websocket.js:3 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/websocket/websocket.js:3 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/websocket_signalr/websocket_signalr.js:4 — the two spans are one implementation copied and then locally edited — 204 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (29 lines × 3 locations) · ×1
  • Duplicated block (29 lines × 3 locations) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:6 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:6 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/login-status-card/index.js:6 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/send-result-card/index.js:7 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (28 lines × 2 locations) · ×1
  • Duplicated block (28 lines × 2 locations) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/utils/senparc.websocket.1.0.js:4 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/utils/senparc.websocket.1.0.js:4 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/utils/senparc.websocket.2.0.js:4 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (26 lines × 2 locations) · ×1
  • Duplicated block (26 lines × 2 locations) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js:136 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js:136 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js:172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (15 lines × 4 locations) · ×1
  • Duplicated block (15 lines × 4 locations) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:6 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:6 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/login-status-card/index.js:6 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/message-list-card/index.js:8 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/send-result-card/index.js:7 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×1
  • Duplicated block (14 lines × 2 locations) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/Login/Login.js:20 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/Login/Login.js:20 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js:389 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×1
  • Duplicated block (10 lines × 2 locations) tools/WeixinDev/src/interfaceInserter.ts:33 — tools/WeixinDev/src/interfaceInserter.ts:33 · tools/WeixinDev/src/sidebarProvider.ts:60 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×1
  • Duplicated block (9 lines × 2 locations) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:41 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/connection-status-card/index.js:41 · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/skills/senparc-login-ws/components/send-result-card/index.js:34 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 15, cognitive 19) · ×1
  • Complex function (anonymous) (cyclomatic 15, cognitive 19) tools/WeixinDev/src/extension.ts:44 — (anonymous) has cyclomatic complexity 15 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js · ×1
  • src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js: 407 lines of code src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js:1 — src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/pages/index/index.js has 407 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~411 LoC) · ×1
  • Dead file (~411 LoC) tools/WeixinDev/src/sidebarProvider.ts — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~260 LoC) · ×1
  • Dead file (~260 LoC) tools/WeixinDev/src/apiService.ts — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (tools/WeixinDev/src/interfaceInserter.ts, tools/WeixinDev/src/sidebarProvider.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~223 LoC) · ×1
  • Dead file (~223 LoC) tools/WeixinDev/src/interfaceInserter.ts — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (tools/WeixinDev/src/sidebarProvider.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~42 LoC) · ×1
  • Dead file (~42 LoC) tools/WeixinDev/diagnose.js — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~38 LoC) · ×1
  • Dead file (~38 LoC) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen.AppDemo/utils/senparc.websocket.1.0.js — no import path from any entry point (14 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Contributed command 'weixindev.openSidebar' is never registered · ×1
  • Contributed command 'weixindev.openSidebar' is never registered tools/WeixinDev/package.json — tools/WeixinDev/package.json contributes this command, so VS Code offers it in the palette and in every menu or keybinding that cites it — but no source file calls registerCommand with this id, and the id occurs in no source string at all; invoking it fails with "command 'weixindev.openSidebar' not found". The source does register 1 command(s) by literal ('weixindev.insertWeixinInterface'), which is what makes the absence provable. Register it at activation, or delete the contribution together with the menu and keybinding entries that reference it.
R7 · Dead Code · Contributed command 'weixindev.refreshWebview' is never registered · ×1
  • Contributed command 'weixindev.refreshWebview' is never registered tools/WeixinDev/package.json — tools/WeixinDev/package.json contributes this command, so VS Code offers it in the palette and in every menu or keybinding that cites it — but no source file calls registerCommand with this id, and the id occurs in no source string at all; invoking it fails with "command 'weixindev.refreshWebview' not found". The source does register 1 command(s) by literal ('weixindev.insertWeixinInterface'), which is what makes the absence provable. Register it at activation, or delete the contribution together with the menu and keybinding entries that reference it.
R8 · Dependency Hygiene · Unused dependency 'sharp' · ×1
  • Unused dependency 'sharp' — Declared in tools/WeixinBrowserPlugin/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@vscode/test-electron' · ×1
  • Unused dependency '@vscode/test-electron' — Declared in tools/WeixinDev/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
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.
X1 · Async correctness · Blocking `Thread.Sleep` inside an `async` method · ×1
  • Blocking `Thread.Sleep` inside an `async` method REDACTED:315 — `Thread.Sleep` parks the thread for the whole delay: no other work runs on it, and under load the pool must grow to make up for it. `await Task.Delay(…)` suspends only this method.
X1 · Async correctness · Sync-over-async (deadlock risk) through `Task.WaitAll` · ×1
  • Sync-over-async (deadlock risk) through `Task.WaitAll` REDACTED:413 — `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead.
Minor — 410 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×274
  • Orphaned file src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Draft/DraftApi.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardCreate/CardCreateData.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NewTmpl/NewTmplApi.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Complaint/Entities/ReturnJson/QueryComplaintsReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/CombineTransactionsRequestData.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/RequestData/PayParkingRequestData.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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Mass/LinkerCorp/LinkerCorpApi.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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/CustomerAcquisition/CustomerAcquisitionApi.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/NotifyJson/BusifavorNotifyJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.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 src/Senparc.Weixin.Open/Senparc.Weixin.Open/MessageHandlers/ThirdPartyMessageHandlerAsync.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/RequestData/CreateProfitsharingRequestData.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/OA/OAJson/ApprovalCreateTemplateRequest.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/ReturnJson/QueryPartnershipsReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Complaint/Entities/ReturnJson/QueryComplaintReturnJson.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryProfitsharingReturnJson.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 src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/QrCodeJump/QrCodeJumpApi.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/FreePublish/FreePublishApi.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Complaint/ComplaintApis.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/RequestData/AddProfitsharingReceiverRequestData.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 src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/CustomService/CustomServiceApi.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Complaint/Entities/ReturnJson/QueryNegotiationHistorysReturnJson.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Analysis/AnalysisResultJson/ArticleAnalysisItemJson.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.
  • + 249 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Commented-out code · ×34
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:19 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:20 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:24 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:29 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:35 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:49 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:51 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:54 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:58 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:60 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:61 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:236 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:248 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:255 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:258 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:261 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:263 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/Device/Index.cshtml:279 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/TenPayV3/JsApi.cshtml:89 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Views/TenPayV3/JsApi.cshtml:95 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Views/Device/Index.cshtml:19 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Views/Device/Index.cshtml:20 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Views/Device/Index.cshtml:24 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Views/Device/Index.cshtml:29 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code Samples/All/net45-mvc/Senparc.Weixin.MP.Sample/Views/Device/Index.cshtml:35 — A line of JavaScript has been commented out of this view's inline script rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • + 9 more in this group — see findings.md.
P2 · Observability · Console output used as the logging channel · ×28
  • Console output used as the logging channel REDACTED:174 — `REDACTED` reports through `Console.Write…` at line 174 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:318 — `REDACTED` reports through `Console.Write…` at line 318 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:319 — `REDACTED` reports through `Console.Write…` at line 319 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:721 — `REDACTED` reports through `Console.Write…` at line 721 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:747 — `REDACTED` reports through `Console.Write…` at line 747 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:170 — `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs` reports through `Console.Write…` at line 170 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:258 — `Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs` reports through `Console.Write…` at line 258 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:670 — `REDACTED` reports through `Console.Write…` at line 670 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:699 — `REDACTED` reports through `Console.Write…` at line 699 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:71 — `REDACTED` reports through `Console.Write…` at line 71 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:190 — `REDACTED` reports through `Console.Write…` at line 190 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:349 — `REDACTED` reports through `Console.Write…` at line 349 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:350 — `REDACTED` reports through `Console.Write…` at line 350 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:689 — `REDACTED` reports through `Console.Write…` at line 689 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:715 — `REDACTED` reports through `Console.Write…` at line 715 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:156 — `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` reports through `Console.Write…` at line 156 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:244 — `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` reports through `Console.Write…` at line 244 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:670 — `REDACTED` reports through `Console.Write…` at line 670 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:699 — `REDACTED` reports through `Console.Write…` at line 699 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:190 — `REDACTED` reports through `Console.Write…` at line 190 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:349 — `REDACTED` reports through `Console.Write…` at line 349 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:350 — `REDACTED` reports through `Console.Write…` at line 350 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:689 — `REDACTED` reports through `Console.Write…` at line 689 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel REDACTED:715 — `REDACTED` reports through `Console.Write…` at line 715 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs:156 — `Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.cs` reports through `Console.Write…` at line 156 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • + 3 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate REDACTED:234 — `!Request.IsLocal() && await cache.CheckExistedAsync(cacheKey)` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs:253 — `!await CheckRegisteredAsync(appId).ConfigureAwait(false) || getNewTicket` appears character-identically in 2 files — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/JsApiTicketContainer.cs, src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/WxCardApiTicketContainer.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 Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:536 — `!string.IsNullOrEmpty(memcachedConfigurationStr) && memcachedConfigurationStr != "#{Cache_Memcached_Configuration}#"` appears character-identically in 2 files — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs, Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.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 Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs:524 — `!string.IsNullOrEmpty(redisConfigurationStr) && redisConfigurationStr != "#{Cache_Redis_Configuration}#"` appears character-identically in 2 files — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Startup.cs, Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Startup.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 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/FundApp/FundAppApis.Authorization.cs:182 — `!string.IsNullOrWhiteSpace(configuredId) && publicKeys.TryGetValue(configuredId, out var configuredKey)` appears character-identically in 2 files — src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/FundApp/FundAppApis.Authorization.cs, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Security/SecurityEchoApis.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs:435 — `!string.IsNullOrWhiteSpace(responseText) && responseText.TrimStart().StartsWith("{")` appears character-identically in 2 files — src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/NonTaxPay/NonTaxPayApi.cs, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Delivery/DeliveryProviderApi.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 src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs:108 — `Config.ThrownWhenJsonResultFaild && ex != null` appears character-identically in 2 files — src/Senparc.Weixin/Senparc.Weixin/CommonAPIs/CommonJsonSend.cs, src/Senparc.Weixin/Senparc.Weixin/Utilities/HttpUtility/Post.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 REDACTED:22 — `ConfigHelper.CodeCollection.ContainsKey(guid) && ConfigHelper.CodeCollection[guid].AllowDownload` appears character-identically in 3 files — REDACTED, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:129 — `Directory.GetFiles(tempDir).Length < i + 1/* readme.txt */ && SystemTime.NowDiff(dt1) < TimeSpan.FromSeconds(30)` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:276 — `OnlyAllowEncryptMessage && !UsingEncryptMessage` appears character-identically in 2 files — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs:246 — `_postModel != null && !_postModel.Token.IsNullOrWhiteSpace() && postDataDocument.Root.Element("Encrypt") != null && !string.IsNullOrEmpty(po…` appears character-identically in 2 files — src/Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/MessageHandlers/WxOpenMessageHandler.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 REDACTED:184 — `cacheBag != null && cacheBag.DateTime == bag.DateTime && bag.Key == shortBagKey` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:257 — `checkWatermark && decodedEntity is DecodedUserInfo decodedUserInfo` appears character-identically in 3 files — REDACTED, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:202 — `containerResult1 != null && containerResult2 != null && containerResult1.Key == containerResult2.Key && containerResult1.DateTime == contain…` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs:83 — `currentMessageContext.StorageData == null || (currentMessageContext.StorageData is int)` appears character-identically in 2 files — Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs, Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:141 — `fullButton.ContainsKey("key") && !string.IsNullOrEmpty(fullButton["key"] as string)` appears character-identically in 2 files — src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs, src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:158 — `fullResult != null && fullResult.ContainsKey("errmsg")` appears character-identically in 2 files — src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs, src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.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 src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.cs:132 — `fullResult != null && fullResult.ContainsKey("menu")` appears character-identically in 2 files — src/Senparc.Weixin.MP/Senparc.Weixin.MP/CommonAPIs/Menu/CommonApi.Menu.Custom.cs, src/Senparc.Weixin.Work/Senparc.Weixin.Work/CommonAPIs/CommonApi.Menu.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 src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs:212 — `getNewToken || accessTokenBag.AccessTokenExpireTime <= SystemTime.Now` appears character-identically in 2 files — src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs, src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Containers/AccessTokenContainer.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 Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Filters/CustomOAuthAttribute.cs:30 — `httpContext != null && httpContext.Session.GetString("OpenId") != null` appears character-identically in 4 files — Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Filters/CustomOAuthAttribute.cs, Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Filters/CustomOAuthAttribute.cs, Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Filters/CustomOAuthAttribute.cs, Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Filters/CustomOAuthAttribute.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 REDACTED:304 — `index < iLeftLength && index < iRightLength` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:46 — `"MSG_FROM_WEBVIEW" === n || "GET_ASSDK_RES" === n` appears character-identically in 2 files — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js, src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js. 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 src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:119 — `"POST" != c || p || s.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")` appears character-identically in 2 files — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js, src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js. 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 src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js:99 — `F.networkTimeout && F.networkTimeout.request` appears character-identically in 2 files — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/weapp/appservice/asdebug.js, src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/weapp/appservice/asdebug.js. 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 src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/stores/projectStores.js:47 — `JSON.parse(localStorage.getItem("projectLists")) || []` appears character-identically in 2 files — src/Senparc.Weixin.WxOpen/小程序资料/crack/mac/Resources/app.nw/app/dist/stores/projectStores.js, src/Senparc.Weixin.WxOpen/小程序资料/crack/win/package.nw/app/dist/stroes/projectStores.js. 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.
M4 · Documentation accuracy · README/code drift · ×20
  • README/code drift readme.en.md:611 — readme.en.md names .NET 5, but the projects target .NET 3, 6, 8, 10. 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.
  • README/code drift docs/NET9_CERTIFICATE_COMPATIBILITY.md:212 — docs/NET9_CERTIFICATE_COMPATIBILITY.md names .NET 9, but the projects target .NET 3, 6, 8, 10. 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.
  • README/code drift src/readme.md:13 — src/readme.md links to `src/Senparc.WebSocket/`, but `src/src/Senparc.WebSocket` does not exist. 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.
  • README/code drift src/readme.md:14 — src/readme.md links to `src/Senparc.Weixin.Cache`, but `src/src/Senparc.Weixin.Cache` does not exist. 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.
  • README/code drift src/readme.md:15 — src/readme.md links to `src/Senparc.Weixin.AspNet`, but `src/src/Senparc.Weixin.AspNet` does not exist. 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.
  • README/code drift src/readme.md:16 — src/readme.md links to `src/Senparc.Weixin.MP.MvcExtension`, but `src/src/Senparc.Weixin.MP.MvcExtension` does not exist. 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.
  • README/code drift src/readme.md:17 — src/readme.md links to `src/Senparc.Weixin.MP`, but `src/src/Senparc.Weixin.MP` does not exist. 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.
  • README/code drift src/readme.md:18 — src/readme.md links to `src/Senparc.Weixin.MP.Middleware`, but `src/src/Senparc.Weixin.MP.Middleware` does not exist. 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.
  • README/code drift src/readme.md:19 — src/readme.md links to `src/Senparc.Weixin.Open`, but `src/src/Senparc.Weixin.Open` does not exist. 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.
  • README/code drift src/readme.md:20 — src/readme.md links to `src/Senparc.Weixin.TenPay`, but `src/src/Senparc.Weixin.TenPay` does not exist. 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.
  • README/code drift src/readme.md:21 — src/readme.md links to `src/Senparc.Weixin.Work`, but `src/src/Senparc.Weixin.Work` does not exist. 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.
  • README/code drift src/readme.md:22 — src/readme.md links to `src/Senparc.Weixin.Work.Middleware`, but `src/src/Senparc.Weixin.Work.Middleware` does not exist. 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.
  • README/code drift src/readme.md:23 — src/readme.md links to `src/Senparc.Weixin.WxOpen`, but `src/src/Senparc.Weixin.WxOpen` does not exist. 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.
  • README/code drift src/readme.md:24 — src/readme.md links to `src/Senparc.Weixin.WxOpen.Middleware`, but `src/src/Senparc.Weixin.WxOpen.Middleware` does not exist. 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.
  • README/code drift src/readme.md:25 — src/readme.md links to `src/Senparc.Weixin`, but `src/src/Senparc.Weixin` does not exist. 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.
  • README/code drift tools/WeixinDev/README.md:135 — tools/WeixinDev/README.md changes into `WeiXinMPSDK/tools/WeixinDev`, but no such folder 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.
  • README/code drift tools/WeixinDev/README.md:168 — tools/WeixinDev/README.md links to `LICENSE`, but `tools/WeixinDev/LICENSE` does not exist. 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.
  • README/code drift docs/en/guide/lib.md:9 — docs/en/guide/lib.md names .NET 5, but the projects target .NET 3, 6, 8, 10. 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.
  • README/code drift docs/zh/guide/lib.md:9 — docs/zh/guide/lib.md names .NET 5, but the projects target .NET 3, 6, 8, 10. 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.
  • README/code drift tools/WeixinBrowserPlugin/src/README.md:265 — tools/WeixinBrowserPlugin/src/README.md links to `LICENSE`, but `tools/WeixinBrowserPlugin/src/LICENSE` does not exist. 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.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×4
  • Hand-rolled JSON/XML parsing via regex REDACTED:52 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:104 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:52 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:49 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
AX6 · Interface segregation · Fat interface · ×1
  • Fat interface: ISenparcWeixinSettingForTenpayV3 (18 members) src/Senparc.Weixin/Senparc.Weixin/Entities/SenparcWeixinSettings/SenparcWeixinSettingItem.Interfaces.cs:163 — `ISenparcWeixinSettingForTenpayV3` declares 18 members: `TenPayV3_MchId`, `TenPayV3_SubMchId`, `TenPayV3_Key`, `TenPayV3_CertPath`, `TenPayV3_CertSecret`, `TenPayV3_AppId`, `TenPayV3_AppSecret`, `TenPayV3_SubAppId`, `TenPayV3_SubAppSecret`, `TenPayV3_TenpayNotify`, `TenPayV3_PrivateKey`, `TenPayV3_SerialNumber`, `TenPayV3_APIv3Key`, `TenPayV3_TenPayPubKey`, `TenPayV3_TenPayPubKeyID`, `TenPayV3_TenPayPubKeyEnable`, `TenPayV3_WxOpenTenpayNotify`, `EncryptionType`. 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.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies — Authorization IS enforced here (via [Authorize]/guards) — this is NOT a claim that endpoints are unprotected. What's missing is NAMED policies (AddAuthorization/AddPolicy, RequireRole/RequireClaim, RequireAuthorization): the access rules are implicit rather than named and testable. Recommendation, not a defect — name the rules so they're reviewable.
C5 · Data-Subject Rights · Partial data-subject-rights support · ×1
  • Partial data-subject-rights support — Corroborated rights: erasure ✗ · export ✓ · consent ✗. Each tick means this scan found code in the repository implementing that right — a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A ✗ therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.
D17 · Explicit Debt · ObsoleteWithoutCallers · ×1
  • ObsoleteWithoutCallers Samples/All/Senparc.Weixin.Sample.CommonService/TemplateMessageService.cs:67 — [Obsolete] RunTemplateTest
D18 · Solution Shape · Duplicate project file · ×1
  • Duplicate project file: Senparc.Weixin.Cache.Redis.Tests src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis.Tests/Senparc.Weixin.Cache.Redis.Tests.csproj — `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis.Tests/Senparc.Weixin.Cache.Redis.Tests.csproj` sits beside `src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis.Tests/Senparc.Weixin.Cache.Redis.Tests.net10.csproj` and compiles the same sources, but no solution in the repository lists it. It is a second build of the same code that nobody builds with the rest: it drifts from the original unseen, and the two share one `obj/` folder, so restoring one overwrites the other's assets. Delete it; if it builds a variant on purpose (another target framework, a strong-named package), make that variant a `<TargetFrameworks>` entry or a property of the original, or list it in the solution so it is built and kept in step.
D18 · Solution Shape · Thin analysable surface across projects · ×1
  • Thin analysable surface across projects: Senparc.WebSocket.packages src/Senparc.WebSocket/src/Senparc.WebSocket/Senparc.WebSocket/Senparc.WebSocket.packages.csproj — 1 project(s) carry only a thin slice of real code; `Senparc.WebSocket.packages` has 32 significant line(s). The mean analysable-surface weight is 99 %; this project lowers Solution Shape by about 0.1 point(s). Consolidate it or grow it into a substantial, well-scoped assembly.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D21 · Naming Consistency · Inconsistent casing and naming for the TenPay V3 module components. Some types use 'TenPay.V3' (PascalCase V3), while others use 'TenPayV3' (camelCase V3). Additionally, one property name contains a typo ('ProfitShareing' instead of 'ProfitSharing'). · ×1
  • Inconsistent casing and naming for the TenPay V3 module components. Some types use 'TenPay.V3' (PascalCase V3), while others use 'TenPayV3' (camelCase V3). Additionally, one property name contains a typo ('ProfitShareing' instead of 'ProfitSharing'). — Standardize to 'TenPayV3' for the namespace/type prefix and correct 'ProfitShareing' to 'ProfitSharing'. (symbols: Senparc.Weixin.TenPay.V3.TenPay, Senparc.Weixin.TenPay.V3.TenPayV3UnifiedorderRequestData, Senparc.Weixin.TenPay.V3.TenPayV3RefundQueryRequestData, Senparc.Weixin.TenPay.V3.TenpayV3ProfitShareingAddReceiverRequestData)
D24 · Comment Value · redundant comment · ×1
  • redundant comment Samples/All/Senparc.Weixin.Sample.CommonService/Utilities/QrCodeHelper.cs:40 — ".net core 必须要加" — delete - restates .NET Core flush requirement; only explain why it matters if there is a real bug
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 14 of 91 project(s) overshoot their size bounds, lowering Project Cohesion to 7.0/10. The most over is `Senparc.Weixin.Work.net10(net462)` (72510 LoC, 2535 public types across 81 namespaces). Review these for cohesion — split a project that spans unrelated responsibilities.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 274 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/CreateProfitsharingReturnJson.cs, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Complaint/Entities/ReturnJson/QueryComplaintsReturnJson.cs, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BasePay/Entities/RequestData/CombineTransactionsRequestData.cs, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/VehicleParking/Entities/RequestData/PayParkingRequestData.cs, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Marketing/Entities/NotifyJson/BusifavorNotifyJson.cs, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/ReturnProfitsharingReturnJson.cs, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/RequestData/CreateProfitsharingRequestData.cs, src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Profitsharing/Entities/ReturnJson/QueryReturnProfitsharingReturnJson.cs (and 266 more) (314 orphaned of 1098 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; 1098 of the 1906 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P10 · Library API & versioning · Large public API surface · ×1
  • Large public API surface — 169/203 types (83%) are public. For a library, every public type is a stability contract — make internal-by-default and expose only the intended API.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 13936 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
PF1 · Benchmark discipline · No performance benchmarks · ×1
  • No performance benchmarks — No benchmark suite was found by the two searches this check runs. FIRST, a BenchmarkDotNet package reference in any project file — every project the workspace loaded, plus a walk of project files on disk that never loaded, because a benchmark suite is exactly the project a partial load drops. SECOND, a script harness: a file whose name contains `benchmark` and ends `.py`, `.sh`, `.ps1`, `.bash`, `.rb`, `.js` or `.mjs`, credited ONLY when this repository's CI text also mentions benchmarks — a harness no pipeline runs is read as a fixture, deliberately. Neither search can see a benchmark suite in another ecosystem's idiom (a Go `testing.B` file, a JMH or criterion project, a pytest-benchmark run), so this is 'no benchmark found by those two searches', not a verdict that the repository has none. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.
X2 · Cancellation propagation · Not all async methods take a CancellationToken · ×1
  • Not all async methods take a CancellationToken — Only 67/1590 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.
X5 · Nullable reference types · Nullable reference types not enabled everywhere · ×1
  • Nullable reference types not enabled everywhere — 21/35 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch tools/Senparc.Weixin.CLI/WorkspaceServices.cs:306 — `ReadFile` swallows `DecoderFallbackException` into `return "ERROR: only valid UTF-8 text files can be read";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Minor — 72 finding(s)
D19 · Documentation Quality · XML-doc coverage · ×65
  • XML-doc coverage: Senparc.Weixin.Work.net10(net462) src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net10.csproj — Senparc.Weixin.Work.net10(net462): 85 % XML-doc coverage (10307/12144).
  • XML-doc coverage: Senparc.Weixin.net10(net462) src/Senparc.Weixin/Senparc.Weixin/Senparc.Weixin.net10.csproj — Senparc.Weixin.net10(net462): 61 % XML-doc coverage (310/508).
  • XML-doc coverage: Senparc.WebSocket.net10(net462) src/Senparc.WebSocket/src/Senparc.WebSocket/Senparc.WebSocket/Senparc.WebSocket.net10.csproj — Senparc.WebSocket.net10(net462): 63 % XML-doc coverage (19/30).
  • XML-doc coverage: Senparc.Weixin.MP.net10(net462) src/Senparc.Weixin.MP/Senparc.Weixin.MP/Senparc.Weixin.MP.net10.csproj — Senparc.Weixin.MP.net10(net462): 78 % XML-doc coverage (3914/5022).
  • XML-doc coverage: Senparc.Weixin.MP.MvcExtension.net10(net462) src/Senparc.Weixin.MP.MvcExtension/Senparc.Weixin.MP.MvcExtension/Senparc.Weixin.MP.MvcExtension.net10.csproj — Senparc.Weixin.MP.MvcExtension.net10(net462): 67 % XML-doc coverage (8/12).
  • XML-doc coverage: Senparc.Weixin.Open.net10(net462) src/Senparc.Weixin.Open/Senparc.Weixin.Open/Senparc.Weixin.Open.net10.csproj — Senparc.Weixin.Open.net10(net462): 86 % XML-doc coverage (2257/2619).
  • XML-doc coverage: Senparc.Weixin.WxOpen.net10(net462) src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net10.csproj — Senparc.Weixin.WxOpen.net10(net462): 89 % XML-doc coverage (4908/5495).
  • XML-doc coverage: Senparc.Weixin.Cache.Memcached.net10(net462) src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Memcached/Senparc.Weixin.Cache.Memcached.net10.csproj — Senparc.Weixin.Cache.Memcached.net10(net462): 27 % XML-doc coverage (3/11).
  • XML-doc coverage: Senparc.Weixin.Cache.Redis.net10(net462) src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis/Senparc.Weixin.Cache.Redis.net10.csproj — Senparc.Weixin.Cache.Redis.net10(net462): 62 % XML-doc coverage (8/13).
  • XML-doc coverage: Senparc.Weixin.TenPay.net10(net462) src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay/Senparc.Weixin.TenPay.net10.csproj — Senparc.Weixin.TenPay.net10(net462): 87 % XML-doc coverage (911/1044).
  • XML-doc coverage: Senparc.Weixin.Sample.net10 Samples/All/net10-mvc/Senparc.Weixin.Sample.Net10/Senparc.Weixin.Sample.net10.csproj — Senparc.Weixin.Sample.net10: 40 % XML-doc coverage (107/269).
  • XML-doc coverage: Senparc.Weixin.Net10Sample.CommonService Samples/All/Senparc.Weixin.Sample.CommonService/Senparc.Weixin.Net10Sample.CommonService.csproj — Senparc.Weixin.Net10Sample.CommonService: 37 % XML-doc coverage (59/158).
  • XML-doc coverage: Senparc.Weixin.AspNet.net10(net462) src/Senparc.Weixin.AspNet/Senparc.Weixin.AspNet.net10.csproj — Senparc.Weixin.AspNet.net10(net462): 43 % XML-doc coverage (10/23).
  • XML-doc coverage: Senparc.Weixin.Cache.CsRedis.net10(net462) src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.CsRedis/Senparc.Weixin.Cache.CsRedis.net10.csproj — Senparc.Weixin.Cache.CsRedis.net10(net462): 62 % XML-doc coverage (8/13).
  • XML-doc coverage: Senparc.Weixin.TenPayV3.net10 src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Senparc.Weixin.TenPayV3.net10.csproj — Senparc.Weixin.TenPayV3.net10: 93 % XML-doc coverage (6301/6746).
  • XML-doc coverage: Senparc.Weixin.Sample.MP.net10 Samples/MP/Senparc.Weixin.Sample.MP/Senparc.Weixin.Sample.MP.net10.csproj — Senparc.Weixin.Sample.MP.net10: 48 % XML-doc coverage (31/64).
  • XML-doc coverage: Senparc.Weixin.Sample.Work.net10 Samples/Work/Senparc.Weixin.Sample.Work/Senparc.Weixin.Sample.Work.net10.csproj — Senparc.Weixin.Sample.Work.net10: 24 % XML-doc coverage (11/45).
  • XML-doc coverage: Senparc.Weixin.Sample.WxOpen.net10 Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/Senparc.Weixin.Sample.WxOpen.net10.csproj — Senparc.Weixin.Sample.WxOpen.net10: 33 % XML-doc coverage (15/45).
  • XML-doc coverage: Senparc.Weixin.Sample.TenPayV2.net10 Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Senparc.Weixin.Sample.TenPayV2.net10.csproj — Senparc.Weixin.Sample.TenPayV2.net10: 27 % XML-doc coverage (17/64).
  • XML-doc coverage: Senparc.Weixin.Sample.TenPayV3.net10 Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Senparc.Weixin.Sample.TenPayV3.net10.csproj — Senparc.Weixin.Sample.TenPayV3.net10: 30 % XML-doc coverage (19/64).
  • XML-doc coverage: Senparc.Weixin.Sample.MP.Simple Samples/MP/Senparc.Weixin.Sample.MP.Simple/Senparc.Weixin.Sample.MP.Simple.csproj — Senparc.Weixin.Sample.MP.Simple: 18 % XML-doc coverage (3/17).
  • XML-doc coverage: Senparc.Weixin.Cache.Dapr.net10 src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Dapr/Senparc.Weixin.Cache.Dapr.net10.csproj — Senparc.Weixin.Cache.Dapr.net10: 67 % XML-doc coverage (6/9).
  • XML-doc coverage: Senparc.Weixin.MCP.Server src/Senparc.Weixin.MCP.Server/Senparc.Weixin.MCP.Server.csproj — Senparc.Weixin.MCP.Server: 44 % XML-doc coverage (4/9).
  • XML-doc coverage: Senparc.Weixin.All.net10 src/Senparc.Weixin.All/Senparc.Weixin.All.net10.csproj — Senparc.Weixin.All.net10: 20 % XML-doc coverage (1/5).
  • XML-doc coverage: Senparc.Weixin.net8(net462) src/Senparc.Weixin/Senparc.Weixin/Senparc.Weixin.net8.csproj — Senparc.Weixin.net8(net462): 61 % XML-doc coverage (310/508).
  • + 40 more in this group — see findings.md.
D10 · Test Quality · Mock framework · ×7
  • Mock framework: Moq — Senparc.Weixin.Work.Test.net10 references Moq.
  • Mock framework: Moq — Senparc.Weixin.MP.Test.net10 references Moq.
  • Mock framework: Moq — Senparc.WeixinTests.net10 references Moq.
  • Mock framework: Moq — Senparc.WeixinTests.net8 references Moq.
  • Mock framework: Moq — Senparc.Weixin.MP.Test.net8 references Moq.
  • Mock framework: Moq — Senparc.Weixin.Work.Test.net8 references Moq.
  • Mock framework: Moq — Senparc.Weixin.MCP.Server.Tests references Moq.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-40eb556123f149bc87059cb49b7fa5e6/history.json --exit-code 0 --source .87artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-40eb556123f149bc87059cb49b7fa5e6/tree.json --exit-code 0 --source .2artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .488artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnuget—nuget: not applicable — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan0—
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update25artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .1artifacts/raw/semgrep-gdpr.json
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

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

Phone — 159 field(s)
  • Update_BaseCardInfo.service_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/CardManage/BaseCardUpdateInfo.cs:114
  • Card_BaseInfoBase.service_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/Common/Card_BaseInfo/Card_BaseInfoBase.cs:106
  • GiftCardPageData.service_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Card/Shelf/ShelfCreateData.cs:120
  • UserFiledData.show_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoiceData.cs:98
  • BizField.show_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoiceData.cs:129
  • InvoiceBaseUseData.buyer_address_and_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformData.cs:168
  • InvoiceBaseUseData.seller_address_and_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformData.cs:180
  • User_Info.buyer_address_and_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformResultJson.cs:196
  • User_Info.seller_address_and_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoicePlatformResultJson.cs:208
  • ScanTitleResultJson.phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoiceResultJson.cs:110
  • BizFieldInfo.phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoiceResultJson.cs:143
  • UserFiledInfo.phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoiceResultJson.cs:178
  • Contact.phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoiceResultJson.cs:250
  • GetUserTitleUrlData.phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/MakeOutInvoiceData.cs:199
  • Order.receiver_mobile src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MerChant/Order/OrderResult.cs:100
  • Order.receiver_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/MerChant/Order/OrderResult.cs:104
  • StoreBaseInfoCanBeUpdate.telephone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Poi/StoreJson/StoreBaseInfo.cs:44
  • GetStoreList_BaseInfo.telephone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Poi/StoreJson/StoreResultJson.cs:195
  • Details_Telephone.telephone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Semantic/SemanticResult/Semantic_TelephoneResult.cs:58
  • RegisterData.phone_number src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundJson/RegisterData.cs:41
  • AddStoreJsonData.contract_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Wxa/MerchantJson/AddStoreJsonData.cs:23
  • UpdateStoreData.contract_phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Wxa/MerchantJson/AddStoreJsonData.cs:93
  • CreateMapPoiData.telephone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Wxa/MerchantJson/CreateMapPoiData.cs:58
  • PoiInMap.telephone src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Wxa/MerchantJson/PoiInMap.cs:29
  • RequestMessageEvent_Submit_Invoice_Title.phone src/Senparc.Weixin.MP/Senparc.Weixin.MP/Entities/Request/Event/RequestMessageEvent_Submit_Invoice_Title.cs:56
  • GetPrivacySettingData_OwnerSetting.contact_phone src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentJson/GetPrivacySettingResult.cs:79
  • SetPrivacySettingData_OwnerSetting.contact_phone src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/RequestData/SetPrivacySettingData.cs:43
  • PrincipalInfoModel.mobile src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Icp/IcpJson/Common/IcpSubjectModel.cs:126
  • AuthData.third_party_phone src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Sec/SecJson/AuthData.cs:104
  • WxaAuthAuthData_ContactInfo.mobile src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Sec/SecJson/AuthData.cs:130
  • WxaAuthAuthData_InvoiceInfo_Vat.enterprise_phone src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Sec/SecJson/AuthData.cs:183
  • WxaAuthAuthData_InvoiceInfo_Vat.phone src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Sec/SecJson/AuthData.cs:223
  • Apply4SubCurrentContactInfo.mobile_phone src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubCurrentRequestData.cs:88
  • Apply4SubCurrentBusinessInfo.service_phone src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubCurrentRequestData.cs:310
  • Apply4SubContactInfo.mobile_phone src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubRequestData.cs:203
  • Apply4SubjectApplicationContactInfo.mobile src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Subject/Entities/RequestData/Apply4SubjectCurrentRequestData.cs:62
  • Apply4SubjectContactInfo.mobile_phone src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Subject/Entities/RequestData/Apply4SubjectRequestData.cs:98
  • BrandCardCustomerServiceInfo.customer_service_phone src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandCard/BrandCardModels.cs:91
  • BrandMemberCardCreateRequestData.service_phone src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandMemberCard/BrandMemberCardModels.cs:104
  • BrandMemberCardUpdateRequestData.service_phone src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandMemberCard/BrandMemberCardModels.cs:190
  • + 119 more field(s) in this category.
Email — 38 field(s)
  • UserFiledData.show_email src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoiceData.cs:102
  • UserFiledInfo.email src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Invoice/InvoiceJson/InvoiceResultJson.cs:182
  • RegisterData.email src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundJson/RegisterData.cs:42
  • GetPrivacySettingData_OwnerSetting.contact_email src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/ComponentJson/GetPrivacySettingResult.cs:75
  • SetPrivacySettingData_OwnerSetting.contact_email src/Senparc.Weixin.Open/Senparc.Weixin.Open/ComponentAPIs/RequestData/SetPrivacySettingData.cs:39
  • Item.email src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxOpenAPIs/WxaMpLinkGet/WxaMpLinkGetJsonResult.cs:73
  • CloudRunImageSecretInfo.email src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudRun/CloudRunJsonResults.cs:813
  • PrincipalInfoModel.email src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Icp/IcpJson/Common/IcpSubjectModel.cs:131
  • WxaAuthAuthData_ContactInfo.email src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Sec/SecJson/AuthData.cs:125
  • WxaAuthAuthData_InvoiceInfo_Vat.mailing_address src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Sec/SecJson/AuthData.cs:208
  • Apply4SubCurrentContactInfo.contact_email src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubCurrentRequestData.cs:91
  • Apply4SubContactInfo.contact_email src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubRequestData.cs:204
  • Apply4SubjectContactInfo.contact_email src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Subject/Entities/RequestData/Apply4SubjectRequestData.cs:99
  • ContactInfo.contact_email src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/RequestData/EcommerceSubMerchantRequestData.cs:350
  • ChatDataKeywordEmailList.email_list src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/DataIntelligence/ChatDataKeywordJson.cs:72
  • ChatDataKeywordApplicableRange.exclude_email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/DataIntelligence/ChatDataKeywordJson.cs:110
  • ExmailRecipient.emails src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Exmail/ExmailAppJson.cs:28
  • ExmailUpdateAppEmailAliasRequest.new_email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Exmail/ExmailAppJson.cs:381
  • ExmailAppEmailAliasResult.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Exmail/ExmailAppJson.cs:392
  • ExmailGroupRequest.email_list src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Exmail/ExmailGroupJson.cs:71
  • ExmailGroupResult.email_list src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Exmail/ExmailGroupJson.cs:138
  • ExmailPublicMailCreateRequest.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Exmail/ExmailPublicMailJson.cs:39
  • ExmailPublicMailItem.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Exmail/ExmailPublicMailJson.cs:180
  • ExmailPublicMailSearchItem.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Exmail/ExmailPublicMailJson.cs:232
  • LinkedCorpUser.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/LinkedCorp/LinkedCorpJson.cs:195
  • MemberBase.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MailList/Member/MemberBase.cs:64
  • GetMemberResult.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MailList/Member/MemberResult.cs:84
  • WebinarGuest.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/Meeting/MeetingWebinarJson.cs:365
  • MiniProgramPayContactInfo.contact_email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MiniProgramPay/MiniProgramPayJson.cs:109
  • GetUserDetailResult.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/OAuth2/OAuth2Result.cs:152
  • PayToolInvoiceInfo.receive_email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/PayTool/PayToolJson.cs:161
  • LoginInfo_UserInfo.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/SSO/SsoJson/GetLoginInfoResult.cs:66
  • GetUserInfoByTicketResult.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/ThirdPartyAuth/ThirdPartyAuthJson/ThirdPartyAuthResult.cs:80
  • ThirdParty_AuthUserInfo.email src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/ThirdPartyAuth/ThirdPartyAuthJson/ThirdPartyAuthResult.cs:413
  • RequestMessageEvent_Change_Contact_User_Create.Email src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_Change_Contact.cs:128
  • B2BMerchantContactInfo.contact_email src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/B2B/B2BMerchantJson.cs:245
  • B2BRetailBusinessApplyRequest.contact_email src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/B2B/B2BStoreJson.cs:85
  • GetUserRiskRankParam.email_address src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppJson/GetUserRiskRankParam.cs:34
Financial (card / IBAN) — 9 field(s)
  • Apply4SubCurrentIdCardInfo.id_card_number src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubCurrentRequestData.cs:232
  • Apply4SubIdDocInfo.id_card_number src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Sub/Entities/RequestData/Apply4SubRequestData.cs:163
  • Apply4SubjectApplicationContactInfo.id_card_number src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Subject/Entities/RequestData/Apply4SubjectCurrentRequestData.cs:65
  • Apply4SubjectIdentityInfo.id_card_number src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Apply4Subject/Entities/RequestData/Apply4SubjectRequestData.cs:86
  • BrandApplymentAdminInfo.id_card_number src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/BrandApplyment/BrandApplymentModels.cs:60
  • IdDocInfo.id_card_number src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Ecommerce/Entities/RequestData/EcommerceSubMerchantRequestData.cs:192
  • MiniProgramPayIdCardInfo.id_card_number src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/MiniProgramPay/MiniProgramPayJson.cs:81
  • B2BIdCardInfo.id_card_number src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/B2B/B2BMerchantJson.cs:143
  • B2BMerchantContactInfo.contact_id_card_number src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/B2B/B2BMerchantJson.cs:224
Name — 6 field(s)
  • District.fullname src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/Wxa/MerchantJson/DistrictResultJson.cs:46
  • Category.first_name src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxOpenAPIs/GetCategoryJson/GetCategoryJsonResult.cs:80
  • CloudRunRepositoryName.full_name src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/CloudRun/CloudRunJsonResults.cs:787
  • External_Contact.corp_full_name src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/GetExternalContactResult.cs:64
  • ThirdParty_AuthCorpInfo.corp_full_name src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/ThirdPartyAuth/ThirdPartyAuthJson/ThirdPartyAuthResult.cs:248
  • DistrictItem.fullname src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/WxApp/WxAppJson/GetDistrictJsonResult.cs:35
Date of birth — 1 field(s)
  • DrivingLicenseJsonResult.birth_date src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CV/OCR/OCRJson/DrivingLicenseJsonResult.cs:75

Downloadable artifacts

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

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