Hotspot Analysis Results
Date: 2026-01-09
Executive Summary
The analysis identified 3 Critical Hotspots that represent the highest risk to stability and highest cost of change. These "God Classes" are thousands of lines long and modified weekly.
| File | Churn (Commits/Yr) | Complexity (LOC) | Risk Level |
|---|---|---|---|
WEPV2ModelBuilder.cs | ~61 | 17,166 | 🚨 CRITICAL |
OrderTravelProductOMGT.cs | ~39 | 7,108 | 🚨 CRITICAL |
OrderOMGT.cs | ~31 | 5,113 | 🚨 CRITICAL |
Detailed Findings
1. WPV2ModelBuilder.cs
- Role: Database Context / Model Mapping.
- Problem: Likely contains all
OnModelCreatinglogic and manual mapping for the entire application. - Impact: Any DB schema change requires touching this massive file. Merge conflicts are guaranteed.
2. OrderTravelProductOMGT.cs
- Role: Core Entity for Order Management (Travel Product).
- Problem: "God Entity" that likely mixes data, behavior, and persistence logic.
- Impact: Changes to order logic risk breaking unrelated features due to coupling.
3. OrderOMGT.cs
- Role: Main Order Entity.
- Problem: Similar to
OrderTravelProductOMGT.cs. - Impact: Central point of failure for the OMGT module.
Raw Data
Top 10 Churn (Last 1 Year)
WEPV2ModelBuilder.cs: 61WEP_BEFR.resx: 58WepNG_OMGT.csproj: 40OrderTravelProductOMGT.cs: 39MaintenanceApp/Program.cs: 33OrderOMGT.cs: 31ProductComponentService.cs: 28CheckoutComponentService.cs: 25WEPV2DataContext.cs: 23WepMail.cs: 21
Top 10 Complexity (LOC)
ChartDataRepository.cs: 26,856 (Generated/Library - Ignore)WEPV2ModelBuilder.cs: 17,166WEP_BO.Designer.cs: 16,677 (Generated - Ignore)OrderTravelProductOMGTList.cs: 7,827WepV2.designer.cs: 7,425 (Generated - Ignore)OrderTravelProductOMGT.cs: 7,108InvoicingImport.cs: 5,927OrderAdvancedSearchQueryBuilder.cs: 5,763OrderOMGT.cs: 5,113ACCESS.Designer.cs: 3,707 (Generated - Ignore)
Recommendations
1. WEPV2ModelBuilder.cs (The "Radioactive" Class)
Verdict: ☢️ Treat as Radioactive ☢️. Observation: This file is Auto-Generated by LLBLGen Pro v4.2. Remediation Plan:
- Do NOT Refactor Manually: Any manual cleanup will be lost on next regeneration or cause "fighting the generator".
- Strict Isolation:
- Mark file as
[GeneratedCode]. - If you must modify configuration, use the
partial classfeature. CreateWEPV2ModelBuilder.Custom.cs.
- Mark file as
- Strangulation Strategy (The Escape Hatch):
- Stop adding new entities to this massive context.
- For new modules (e.g.
Reporting), create a new, lightweightDbContext(e.g.ReportingContext). - Migrate highly active modules (like
OMGT) to their own independent Contexts gradually.
2. General Hotspots (OrderOMGT, etc.)
- Split Logic: Use Extension Methods or Partial Classes (short term) or Domain Services (long term) to move logic OUT of the entity.
- Freeze: Prohibit adding NEW logic to these files. New features must go into new classes.