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

HimitZH/HOJ

Measured 16 November 2026, 19:07 UTC, at code version 57d8b52

First survey, so nothing to compare with yet
CAI score 26.6out of 100 At risk

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: 109,711 lines of product code in 5 projects, tests not counted · Estimated rebuild effort: about 0.7 person-years · Weakest lens: Code Health, 17.6

Findings by how serious they are

170 critical 846 serious 303 minor

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

This survey was produced by

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

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

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

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

67of 67 dimensions measured by tools.
1307of 1319 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
67dimensions across 6 lenses, read from 109,711 lines of product code in 5 projects.
Chapters

Executive summary

HimitZH/HOJ is rated At risk because critical security findings are open, most of them in the packages it uses. It scores 26.6 out of 100, which the At risk rating leaves unchanged.

Code Health, at 17.6, is the weakest lens and counts most in the score. The best first step is fixing the password or key in the code, worth about 4.9 points. Adding type checking would lift Code Health itself, worth about 2.9 points. Raising Code Health to 70 would lift the score to about 35.2.

Ninety-nine known security holes in the packages the code depends on can be used by attackers. Thirteen passwords or keys in the code's history and one in the code are open to anyone who can read the repository, and twenty-three controls can't be used without a mouse. Replacing each exposed password or key, updating the vulnerable packages and making the controls work with a keyboard would close these risks. Fixing the weaknesses the scanner points to would fix the security weakness in the code. The 20 buttons or links with no name need a name, even when they only show an icon.

The product code is 109,711 lines, about €95,000 to rebuild.

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

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

If Code Health rose from 17.6 to 70, the lowest score rated Strong, the score would rise from 26.6 to about 35.2.

Code composition: what the lines of code are
Product code 99%Tests 1%
Rebuild cost: about €95,000 · Estimate
Cost to rebuild€31,000 to €160,000, for 524 to 1,663 hours of work, about 0.7 person-years for 1 to 2 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 27. 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: 109,711 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Raises the score by about 4.9 points · Low effort · REDACTED Scanning
2
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 2.9 points · Medium effort · Type Safety
3
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 2.9 points · Medium effort · Large Files

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €95,000 to build again, about 0.7 person-years of work. Its weakest lens is Code Health, at 17.6 (Critical). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 4.9 points for low effort, because it clears the 1 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 205 lines over the last 90 days, which is about 831 lines a year. At that pace, the extra work comes to an estimated 0 to 0.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch hoj docs hoj docs hoj-api hoj-api hoj-backend hoj-backend hoj-backend->hoj-api hoj-judgeServer hoj-judgeServer hoj-judgeServer->hoj-api hoj-vue hoj-vue

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.

135 modules, with 568 dependencies between them. 3 loops run through 9 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 95 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 common.result2 pojo.entity.common3 pojo.entity.contest4 pojo.entity.discussion5 pojo.entity.group6 pojo.entity.judge7 pojo.entity.problem8 pojo.entity.training9 pojo.entity.user10 pojo.dto11 pojo.vo12 controller.admin13 controller.group14 dao.common15 dao.contest16 dao.group17 dao.judge18 dao.problem19 dao.training20 dao.user21 mapper22 service.oj23 utils24 controller.oj25 judge26 manager.admin.system27 manager.msg28 config29 dao.group.impl30 judge.remote31 validator32 manager.admin.problem33 manager.group.problem34 manager.admin.contest35 manager.admin.training36 manager.group.contest37 manager.group.training38 manager.oj39 manager.file40 service.oj.impl
1 common.result
2 pojo.entity.common
3 pojo.entity.contest
4 pojo.entity.discussion
5 pojo.entity.group
6 pojo.entity.judge
7 pojo.entity.problem
8 pojo.entity.training
9 pojo.entity.user
10 pojo.dto11182
11 pojo.vo1352
12 controller.admin141221631156
13 controller.group8121232710
14 dao.common13
15 dao.contest24
16 dao.group1116
17 dao.judge3
18 dao.problem112
19 dao.training24
20 dao.user1114
21 mapper122231133
22 service.oj141231412040
23 utils1
24 controller.oj14123141204014
25 judge1749312
26 manager.admin.system151112211
27 manager.msg41
28 config211321
29 dao.group.impl1111671161
30 judge.remote1113331
31 validator111211211
32 manager.admin.problem1432811
33 manager.group.problem32121312
34 manager.admin.contest2132151111
35 manager.admin.training142111111
36 manager.group.contest2331641161
37 manager.group.training22131633
38 manager.oj1435612052322382691811151241
39 manager.file14313311143151
40 service.oj.impl1412314120401414
Uses a module listed above itPart of a loopThe module itself
1 common.result2 pojo.entity.common3 pojo.entity.contest4 pojo.entity.discussion5 pojo.entity.group6 pojo.entity.judge7 pojo.entity.problem8 pojo.entity.training9 pojo.entity.user10 pojo.dto11 pojo.vo12 controller.admin13 controller.group14 dao.common15 dao.contest16 dao.group17 dao.judge18 dao.problem19 dao.training20 dao.user21 mapper22 service.oj23 utils24 controller.oj25 judge26 manager.admin.system27 manager.msg28 config29 dao.group.impl30 judge.remote31 validator32 manager.admin.problem33 manager.group.problem34 manager.admin.contest35 manager.admin.training36 manager.group.contest37 manager.group.training38 manager.oj39 manager.file40 service.oj.implcommon.result1pojo.entity.common2pojo.entity.contest3pojo.entity.discussion4pojo.entity.group5pojo.entity.judge6pojo.entity.problem7pojo.entity.training8pojo.entity.user9pojo.dto10pojo.vo11controller.admin12controller.group13dao.common14dao.contest15dao.group16dao.judge17dao.problem18dao.training19dao.user20mapper21service.oj22utils23controller.oj24judge25manager.admin.system26manager.msg27config28dao.group.impl29judge.remote30validator31manager.admin.problem32manager.group.problem33manager.admin.contest34manager.admin.training35manager.group.contest36manager.group.training37manager.oj38manager.file39service.oj.impl4011182135214122163115681212327101324111631122411141222311331412314120401141231412040141749312151112211412113211111671161111333111121121114328113212131221321511111421111112331641161221316331435612052322382691811151241143133111431511412314120401414+95 more modules (most-connected shown)

At a glance — Code Health · 17.6 · Critical · gated by R1, R10, R3, R7, X5 ·

At a glance — Architecture · 70.7 · Adequate · gated by D26, R11 ·

At a glance — Maturity · 67.1 · Adequate · gated by D34 ·

At a glance — Readiness · 22.0 · Critical · gated by R4, R6, P1, P3 ·

At a glance — Security · 42.9 · Checked 3 of 9 · gated by D28 ·

At a glance — Accessibility · 36.2 · Weak · gated by AC1, AC2, AC4 ·

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
A03:2025 — Software Supply Chain Failures136High / Critical
A07:2025 — Authentication Failures16High / Critical
A05:2025 — Injection15High / Critical

Roadmap

Top priorities: Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED; Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.

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

Do thisHelpsEffortDimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.+4.9 ptsLowREDACTED Scanning
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+2.9 ptsMediumType Safety
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+2.9 ptsMediumLarge Files
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.+2.9 ptsMediumDead Code
Add a CI workflow that builds and runs the test suite on every push/PR.+2.2 ptsMediumCI/CD gates
Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.+2.2 ptsMediumSecurity & performance tooling
Add tests that import the unreached modules (directly or through their public entry).+2.2 ptsMediumTest Coverage
Add a test runner (vitest / jest / playwright) and eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.+2.2 ptsMediumTooling

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED3.8SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.3MixedDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.2MixedStatic Analysis (SAST): Medium: REDACTED
hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java5.6MixedCognitive Complexity: JudgeRun.subtaskJudgeAllCase (cognitive 16)
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.8MixedSecrets (history): High secret: REDACTED
REDACTED5.8MixedSecrets (history): High secret: REDACTED
REDACTED5.8MixedSecrets (history): High secret: REDACTED
REDACTED5.8MixedSecrets (history): High secret: REDACTED
REDACTED5.8MixedSecrets (history): High secret: REDACTED
hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java5.9MixedCyclomatic Complexity: ConfigManager.setSwitchConfig (cyclomatic 29)
hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java6.3MixedGod Classes: MethodTooLong: HomeManager.buildSubmissionStatisticsVo
hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java6.5MixedCyclomatic Complexity: DruidAbstractDataSource.testConnectionInternal (cyclomatic 22)
hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java6.7MixedCode Duplication: Edited copy of a member (23 corresponding lines)
REDACTED6.9MixedStatic 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 — 170

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

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

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

Could not be resolved — 18

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

Methodology & how to trust this report

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

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

What we checked — 67 dimensions across the health lenses
D1D2D3D4D5D6D10D13D14D15D17D19D20D21D24D26D27D28D29D30D34D35D43D44AC1AC2AC3AC4AC5AX1AX10AX2AX3AX4AX6M1M2M3M4P1P2P3P6P7R1R10R11R2R3R4R5R6R7R8R9X12X16X18X21X23X24X28X29X3X30X4X5

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, 1307 of 1319 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1e5c1-9b0a-7cbe-9bfe-c35d33f483ec.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.java) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.java) and this repository declares a JVM test suite (hoj-springboot, Maven), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — a Maven build resolved 77 artifact(s) (72 behind a shipped release, reported), but the build resolved only part of the graph, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its JVM 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 (8 contributor(s) across 909 commit(s) sampled, automation and bot accounts excluded). One of them holds 97% of the history; the other 7 hold 0.4% 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.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • AC4 Keyboard semantics — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 7 further occurrence(s) are not listed individually; the score already reflects all 47.
  • AC6 Visual & motion safety — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Visual & motion safety could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository. Engine failure: ArgumentOutOfRangeException: startIndex cannot be larger than length of string. (Parameter 'startIndex').
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Vue components is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Vue components is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 62 further occurrence(s) are not listed individually; the score already reflects all 102.
  • R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 99 further occurrence(s) are not listed individually; the score already reflects all 139.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 8 further occurrence(s) are not listed individually; the score already reflects all 48.
  • X12 Unreachable branch — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 52 further occurrence(s) are not listed individually; the score already reflects all 92.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • 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.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • 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.
  • 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • 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.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.8 / 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.8 / 10 · rule-coverage 100% · ceiling Prevented

62 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ProblemEntityServiceImpl.adminUpdateProblem at 49.

DruidAbstractDataSource.testConnectionInternal (cyclomatic 22) · ×2hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1392
DruidAbstractDataSource.initPhysicalConnection (cyclomatic 18) · ×2hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1744
(anonymous) (cyclomatic 18) · ×2hoj-vue/src/common/api.js:80
encrypt (cyclomatic 18) · ×2hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:565
decrypt (cyclomatic 18) · ×2hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:632

+ 49 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 ProblemEntityServiceImpl.adminUpdateProblem (cyclomatic 49), StartupRunner.initSwitchConfig (cyclomatic 39), ProblemFileManager.importProblem (cyclomatic 35). — 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.8 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D2 · Cognitive Complexity5.5 / 10Adequate✓ Tool-verified

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

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

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

113 method(s) exceeded the cognitive complexity threshold of 15; the worst was ProblemEntityServiceImpl.adminUpdateProblem at 81.

decrypt (cognitive 53) · ×2hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:632
encrypt (cognitive 52) · ×2hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:565
DruidAbstractDataSource.testConnectionInternal (cognitive 43) · ×2hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1392
DruidAbstractDataSource.initPhysicalConnection (cognitive 31) · ×2hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1744
DruidAbstractDataSource.validateConnection (cognitive 27) · ×2hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1320

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

What to do

  1. Bring the 3 bodies over 60 down to 60 or less in Cognitive Complexity — start with ProblemEntityServiceImpl.adminUpdateProblem (cognitive 81), ProblemFileManager.importProblem (cognitive 68), scrollboard.Board.showInitBoard (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 3 together lifts Cognitive Complexity from 5.5 to about 5.9/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 · God Classes9.1 / 10Stronggated by 28 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.1 / 10 · rule-coverage 100% · ceiling Prevented

28 god class(es) detected.

MethodTooLong: ProblemEntityServiceImpl.adminUpdateProblem · ×10hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:112
FileTooLong: pool/DruidAbstractDataSource.java · ×8hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java
ClassTooLong: DruidAbstractDataSource · ×6hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:61
TooManyMethods: DruidAbstractDataSource · ×3hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:61
FunctionTooLong: scrollboard.binb_sha512hoj-scrollBoard/js/scrollboard.js:248

What to do

  1. Resolve the 10 MethodTooLong finding(s) in God Classes — start with ProblemEntityServiceImpl.java (2), ProblemFileManager.java (2), REDACTED. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 8 FileTooLong finding(s) in God Classes — start with DruidAbstractDataSource.java (2), CodeForcesAES.js (2), api.js. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 6 ClassTooLong finding(s) in God Classes — start with DruidAbstractDataSource.java (2), ProblemEntityServiceImpl.java, StartupRunner.java. — One of this dimension's main actionable groups (6 warning-level).

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

D4 · Code Duplication6.5 / 10Adequate✓ Tool-verified

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

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

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

261 duplicated block group(s) detected. 8.9 % of the production lines (9,720 of 109,711) are in a reported copy. A further 105 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .vue (44% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (8 lines × 2) · ×17hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:199
Duplicated block (11 lines × 2) · ×14hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1279
Duplicated block (7 lines × 2) · ×14hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:65
Duplicated block (10 lines × 2) · ×13hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1038
Duplicated block (9 lines × 2) · ×13hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:697

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

What to do

  1. Resolve the 17 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with ContestCalculateRankManager.java (3), DruidAbstractDataSource.java (3), ProblemEntityServiceImpl.java (2). — One of this dimension's main actionable groups (17 warning-level).
  2. Resolve the 14 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with DruidAbstractDataSource.java (4), AdminContestProblemManager.java (2), GroupContestProblemManager.java (2). — One of this dimension's main actionable groups (14 warning-level).
  3. Resolve the 14 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with AdminContestProblemManager.java (3), ContestCalculateRankManager.java (2), CommentEntityServiceImpl.java. — One of this dimension's main actionable groups (14 warning-level).

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

D5 · Coupling8.4 / 10Strong✓ Tool-verified

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

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

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

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

5 production modules (Maven+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence, with abstractness counted on 3 of the 5 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: hoj-api

What to do

  1. Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).

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

D6 · Cohesion (LCOM4)9.5 / 10Stronggated by 6 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.5 / 10 · rule-coverage 100% · ceiling Verified

6 of 149 classes have LCOM4 above 3.

Low cohesion: GlobalExceptionAdvice (LCOM4 13) · ×6hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/advice/GlobalExceptionAdvice.java:49

What to do

  1. Resolve the 6 Low cohesion finding(s) in Cohesion (LCOM4) — start with GlobalExceptionAdvice.java, ScheduleServiceImpl.java, CommonManager.java. — One of this dimension's main actionable groups (6 warning-level).

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

D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified

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

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

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

0 skipped, 14 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 14 tests (2 harness-style project(s) excluded from the assertion penalty).

No direct assertions: test · ×14hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/AtcoderJudgeTest.java:32
Test project verifies nothing: hoj-backend · ×2hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java:69

✓ On the Gold path — maintain.

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

D13 · REDACTED Scanning5.0 / 10Adequate✓ 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 5.0 / 10 · rule-coverage 100% · ceiling Prevented

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

REDACTED

What to do

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

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

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

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

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

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

0 of 10 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 4 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 31 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph. A further 1 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's JVM 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 Hotspots10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

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

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

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

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

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

TodoComment · ×4REDACTED:185

What to do

  1. Resolve the 4 TodoComment finding(s) in Explicit Debt — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 warning-level).

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

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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

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

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

1 of 1 documentation facets pass in full. 44 document(s) read across 3 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs foundREDACTED:19

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — 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 Consistency5.6 / 10Adequate✓ Tool-verified

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

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

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

3 naming inconsistencies among 68 declarations measured against a convention their peers follow.

`filterBySchoolORRankShowName` spells `OR` where 13 names in the project spell it `Or`hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:265
`getOjContestsList` spells `Oj` where 27 names in the project spell it `OJ`hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleService.java:10
`getID` spells `ID` where 35 names in the project spell it `Id`hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1876

What to do

  1. Resolve the 1 `filterBySchoolORRankShowName` spells `OR` where 13 names in the project… finding(s) in Naming Consistency — start with ContestRankManager.java. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `getOjContestsList` spells `Oj` where 27 names in the project spell it… finding(s) in Naming Consistency — start with ScheduleService.java. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 `getID` spells `ID` where 35 names in the project spell it `Id` finding(s) in Naming Consistency — start with DruidAbstractDataSource.java. — One of this dimension's main actionable groups (1 recommendation-level).

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

D24 · Comment Value10.0 6.0 / 10Adequate○ Nothing flagged

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

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

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 60% · ceiling Documented

0 of 96 judged comments only repeat the code they sit on (0.0 %). 328 comment(s) in another language or script were not judged.

Detailed fixes: d24_recommendation.md.

D26 · Project Cohesion2.0 / 10Critical✓ Tool-verified

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

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

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

2 of 5 build units (Maven, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×2REDACTED:1

What to do

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

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

D27 · Navigability8.5 / 10Strong✓ 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 8.5 / 10 · rule-coverage 100% · ceiling Documented

48 % of calls cross a namespace and 30 % go through an interface, but 100 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.

High interface indirection

What to do

  1. Resolve the 1 High interface indirection finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).

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

D28 · Secrets (history)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

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

REDACTED
REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)4.4 / 10Weak✓ 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 4.4 / 10 · rule-coverage 100% · ceiling Documented

15 finding(s): 0 critical, 1 high, 12 medium, 2 low. semgrep hit a parse error in 1 file(s) — `REDACTED` (lines 10–11, line 16, lines 191–192, …) — 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.

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 Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

136 finding(s): 25 critical, 74 high, 28 medium, 9 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 72 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (51), REDACTED (21). — One of this dimension's main actionable groups (72 issue-level).
  2. Resolve the 24 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (18), REDACTED (6). — One of this dimension's main actionable groups (24 issue-level).
  3. Resolve the 2 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).

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

D34 · Knowledge Freshness0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

207 of 207 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java. Counted over 207 of the 693 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×204hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java:1
Most significant orphaned file · ×3hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1
Dormant codebase

What to do

  1. Resolve the 204 Orphaned file finding(s) in Knowledge Freshness — start with StartupRunner.java (2), Constants.java (2), ContestRecordEntityServiceImpl.java (2). — One of this dimension's main actionable groups (204 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with DruidAbstractDataSource.java (2), ProblemEntityServiceImpl.java. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Dormant codebase 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 Coupling9.9 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: JudgeRun.java↔SandboxRun.java 58%; GroupDetails.vue↔Problem.vue 50%; ojRoutes.js↔Problem.vue 50%

Change coupling: JudgeRun.java ↔ SandboxRun.java · ×3hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:1

What to do

  1. Resolve the 3 Change coupling finding(s) in Change Coupling — start with JudgeRun.java, GroupDetails.vue, ojRoutes.js. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d35_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. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life8.5 / 10Strong✓ 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 8.5 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 1 end-of-life framework(s), read from 1 platform declaration(s) and 20 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 framework: Spring Boot 2hoj-springboot/pom.xml:1

What to do

  1. Resolve the 1 End-of-life framework finding(s) in Platform End-of-Life — start with REDACTED. — One of this dimension's main actionable groups (1 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.

AC1 · Text alternatives3.2 / 10Weak✓ Tool-verified

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

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

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

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×5) — hoj-vue/src/components/oj/common/ResetPassword.vue:23, hoj-vue/src/components/oj/setting/UserInfo.vue:116, hoj-vue/src/views/oj/group/children/GroupContestList.vue:142, …

What to do

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

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

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

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

  • This <footer> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — hoj-vue/src/components/admin/Accordion.vue:12
  • This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label. (×10) — hoj-vue/src/components/oj/comment/comment.vue:65, hoj-vue/src/components/oj/comment/comment.vue:84, hoj-vue/src/components/oj/comment/comment.vue:104, …
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — hoj-vue/src/components/oj/common/ProblemHorizontalMenu.vue:7, hoj-vue/src/components/oj/common/ProblemHorizontalMenu.vue:71
  • This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — hoj-vue/src/components/oj/common/ResetPassword.vue:23
  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×7) — hoj-vue/src/components/oj/setting/UserInfo.vue:177, hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:129, hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:137, …
  • This <i> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — hoj-vue/src/views/admin/Home.vue:127
  • This <span> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×3) — hoj-vue/src/views/admin/general/SystemConfig.vue:124, hoj-vue/src/views/admin/general/SystemConfig.vue:130, hoj-vue/src/views/admin/general/SystemConfig.vue:137
  • A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×2) — hoj-vue/src/views/oj/about/Developer.vue:13, hoj-vue/src/views/oj/about/Developer.vue:19

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure5.4 / 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.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — hoj-scrollBoard/index.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — hoj-scrollBoard/index.html:2, REDACTED:2
  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). — hoj-vue/src/views/oj/problem/Problem.vue:52

What to do

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

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

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

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

  • This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — hoj-scrollBoard/index.html:28
  • An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×14) — hoj-vue/src/App.vue:36, hoj-vue/src/App.vue:39, hoj-vue/src/App.vue:58, …
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×23) — hoj-vue/src/components/admin/Accordion.vue:12, hoj-vue/src/components/oj/comment/comment.vue:65, hoj-vue/src/components/oj/comment/comment.vue:84, …
  • An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action. (×2) — hoj-vue/src/components/oj/comment/comment.vue:53, hoj-vue/src/components/oj/comment/comment.vue:386

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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.0 / 10Exemplary✓ Tool-verified

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

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

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

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.

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

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

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

AX6 · Interface segregation10.0 / 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.

M1 · Documentation (README)7.7 / 10Strong✓ Tool-verified

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

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

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

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

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

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

What to do

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

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

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

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

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

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

P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified

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.

  • No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P2 · Observability10.0 / 10Exemplary○ Nothing flagged

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.

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 spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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.
  • `docs/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — docs/package.json:7

What to do

  • Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add 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.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
P7 · Outbound HTTP resilience10.0 / 10Exemplary○ Nothing flagged

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.

R1 · Type Safety0.0 / 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.

  • 0 typed · 145 plain JS — the untyped files are hoj-scrollBoard/js/scrollboard.js, hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js, hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js, hoj-vue/src/App.vue, hoj-vue/src/common/api.js, hoj-vue/src/common/codeblock.js (+139 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication3.3 / 10Weak✓ Tool-verified

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

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

  • 35 duplicated blocks under hoj-vue/src/ have copies in at least two of the sibling directories components, views — 27 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 35 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 35 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 35 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — hoj-vue/src/components/oj/group/Problem.vue:852
  • 23 duplicated blocks under hoj-vue/src/views/oj/ have copies in at least two of the sibling directories contest, discussion, group, problem, rank, status (+2 more sibling(s) not listed) — 12 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 23 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — hoj-vue/src/views/oj/group/children/GroupProblemList.vue:253
  • 9 duplicated blocks under hoj-vue/src/views/admin/ have copies in at least two of the sibling directories contest, discussion, general, problem, training — 8 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — hoj-vue/src/views/admin/problem/ProblemList.vue:515
  • hoj-vue/src/components/oj/group/Problem.vue:852 · hoj-vue/src/views/admin/problem/Problem.vue:870 — these 2 files are line-for-line copies of one another — 584 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. — hoj-vue/src/components/oj/group/Problem.vue:852
  • hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:1 · hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:1 — these 2 files are line-for-line copies of one another — 499 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. — hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:1
  • hoj-vue/src/components/oj/group/Contest.vue:871 · hoj-vue/src/views/admin/contest/Contest.vue:856 — 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. — hoj-vue/src/components/oj/group/Contest.vue:871
  • hoj-vue/src/views/oj/rank/ACMRank.vue:127 · hoj-vue/src/views/oj/rank/OIRank.vue:132 — these 2 files are line-for-line copies of one another — 106 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. — hoj-vue/src/views/oj/rank/ACMRank.vue:127
  • hoj-vue/src/components/oj/group/AnnouncementList.vue:228 · hoj-vue/src/views/admin/general/Announcement.vue:251 — the two spans are one implementation copied and then locally edited — 523 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. — hoj-vue/src/components/oj/group/AnnouncementList.vue:228
  • hoj-vue/src/components/oj/setting/UserInfo.vue:248 · hoj-vue/src/views/oj/group/children/GroupSetting.vue:353 — 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. — hoj-vue/src/components/oj/setting/UserInfo.vue:248
  • hoj-vue/src/components/oj/group/Training.vue:126 · hoj-vue/src/views/admin/training/Training.vue:105 — the two spans are one implementation copied and then locally edited — 441 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — hoj-vue/src/components/oj/group/Training.vue:126
  • hoj-vue/src/views/admin/problem/ProblemList.vue:515 · hoj-vue/src/views/admin/training/TrainingProblemList.vue:311 — the two spans are one implementation copied and then locally edited — 444 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. — hoj-vue/src/views/admin/problem/ProblemList.vue:515
  • hoj-vue/src/components/oj/group/TrainingProblemList.vue:210 · hoj-vue/src/views/admin/training/TrainingProblemList.vue:311 — the two spans are one implementation copied and then locally edited — 435 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. — hoj-vue/src/components/oj/group/TrainingProblemList.vue:210
  • hoj-vue/src/views/oj/group/GroupList.vue:370 · hoj-vue/src/views/oj/group/children/GroupSetting.vue:274 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — hoj-vue/src/views/oj/group/GroupList.vue:370
  • hoj-vue/src/store/contest.js:35 · hoj-vue/src/store/training.js:19 — the two spans are one implementation copied and then locally edited — 490 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. — hoj-vue/src/store/contest.js:35
  • hoj-vue/src/views/admin/general/Announcement.vue:172 · hoj-vue/src/views/admin/general/SysNotice.vue:162 — the two spans are one implementation copied and then locally edited — 392 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. — hoj-vue/src/views/admin/general/Announcement.vue:172
  • hoj-vue/src/views/oj/group/children/GroupContestList.vue:411 · hoj-vue/src/views/oj/group/children/GroupTrainingList.vue:299 — the two spans are one implementation copied and then locally edited — 328 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. — hoj-vue/src/views/oj/group/children/GroupContestList.vue:411
  • hoj-vue/src/components/oj/group/ContestList.vue:221 · hoj-vue/src/components/oj/group/TrainingList.vue:140 — the two spans are one implementation copied and then locally edited — 416 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. — hoj-vue/src/components/oj/group/ContestList.vue:221
  • hoj-vue/src/views/oj/contest/ContestDetails.vue:439 · hoj-vue/src/views/oj/contest/outside/scoreBoardMixin.js:73 — the two spans are one implementation copied and then locally edited — 291 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. — hoj-vue/src/views/oj/contest/ContestDetails.vue:439
  • hoj-vue/src/views/oj/message/SysMsg.vue:74 · hoj-vue/src/views/oj/message/UserMsg.vue:116 — these 2 files are line-for-line copies of one another — 57 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. — hoj-vue/src/views/oj/message/SysMsg.vue:74
  • hoj-vue/src/views/oj/group/children/GroupProblemList.vue:253 · hoj-vue/src/views/oj/training/TrainingProblemList.vue:152 — the two spans are one implementation copied and then locally edited — 306 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. — hoj-vue/src/views/oj/group/children/GroupProblemList.vue:253
  • hoj-vue/src/views/admin/contest/ContestList.vue:226 · hoj-vue/src/views/admin/training/TrainingList.vue:156 — the two spans are one implementation copied and then locally edited — 275 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. — hoj-vue/src/views/admin/contest/ContestList.vue:226
  • hoj-vue/src/components/admin/AddPublicProblem.vue:71 · hoj-vue/src/components/oj/group/AddPublicProblem.vue:89 — the two spans are one implementation copied and then locally edited — 255 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. — hoj-vue/src/components/admin/AddPublicProblem.vue:71
  • hoj-vue/src/views/oj/contest/children/contestRankMixin.js:44 · hoj-vue/src/views/oj/contest/outside/scoreBoardMixin.js:82 — the two spans are one implementation copied and then locally edited — 240 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. — hoj-vue/src/views/oj/contest/children/contestRankMixin.js:44
  • hoj-vue/src/views/oj/contest/children/ACMContestRank.vue:622 · hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue:560 — 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. — hoj-vue/src/views/oj/contest/children/ACMContestRank.vue:622
  • hoj-vue/src/views/oj/contest/children/ACMInfoAdmin.vue:140 · hoj-vue/src/views/oj/contest/children/ContestAdminPrint.vue:106 — the two spans are one implementation copied and then locally edited — 163 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. — hoj-vue/src/views/oj/contest/children/ACMInfoAdmin.vue:140
  • hoj-vue/src/views/oj/contest/children/OIContestRank.vue:592 · hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue:542 — 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. — hoj-vue/src/views/oj/contest/children/OIContestRank.vue:592
  • hoj-vue/src/components/oj/common/Announcements.vue:126 · hoj-vue/src/components/oj/group/Announcement.vue:106 — 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. — hoj-vue/src/components/oj/common/Announcements.vue:126
  • hoj-vue/src/components/oj/group/Contest.vue:756 · hoj-vue/src/views/admin/contest/Contest.vue:739 — 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. — hoj-vue/src/components/oj/group/Contest.vue:756
  • hoj-vue/src/components/oj/group/AnnouncementList.vue:185 · hoj-vue/src/views/oj/group/children/GroupMemberList.vue:110 — the two spans are one implementation copied and then locally edited — 146 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. — hoj-vue/src/components/oj/group/AnnouncementList.vue:185
  • hoj-vue/src/views/oj/user/UserHome.vue:279 · hoj-vue/src/views/oj/user/UserHome.vue:373 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — hoj-vue/src/views/oj/user/UserHome.vue:279
  • hoj-vue/src/components/oj/group/Contest.vue:813 · hoj-vue/src/views/admin/contest/Contest.vue:794 — 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. — hoj-vue/src/components/oj/group/Contest.vue:813
  • hoj-vue/src/components/oj/group/ProblemList.vue:254 · hoj-vue/src/views/oj/group/children/GroupProblemList.vue:225 — the two spans are one implementation copied and then locally edited — 124 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. — hoj-vue/src/components/oj/group/ProblemList.vue:254
  • hoj-vue/src/store/contest.js:188 · hoj-vue/src/store/group.js:41 — the two spans are one implementation copied and then locally edited — 148 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. — hoj-vue/src/store/contest.js:188
  • hoj-vue/src/components/oj/setting/Account.vue:319 · hoj-vue/src/components/oj/setting/Account.vue:397 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — hoj-vue/src/components/oj/setting/Account.vue:319
  • hoj-vue/src/views/admin/discussion/Discussion.vue:393 · hoj-vue/src/views/admin/general/User.vue:767 — 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. — hoj-vue/src/views/admin/discussion/Discussion.vue:393
  • hoj-vue/src/components/oj/common/Register.vue:95 · hoj-vue/src/views/oj/user/SetNewPassword.vue: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. — hoj-vue/src/components/oj/common/Register.vue:95
  • hoj-vue/src/components/oj/setting/Account.vue:349 · hoj-vue/src/components/oj/setting/Account.vue:425 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — hoj-vue/src/components/oj/setting/Account.vue:349
  • hoj-vue/src/store/contest.js:270 · hoj-vue/src/store/training.js:104 — 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. — hoj-vue/src/store/contest.js:270
  • hoj-vue/src/views/admin/problem/Tag.vue:284 · hoj-vue/src/views/admin/problem/Tag.vue:321 · hoj-vue/src/views/admin/training/Category.vue:133 — the 3 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. — hoj-vue/src/views/admin/problem/Tag.vue:284
  • hoj-vue/src/components/oj/group/ProblemList.vue:403 · hoj-vue/src/components/oj/group/TrainingProblemList.vue:259 — 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. — hoj-vue/src/components/oj/group/ProblemList.vue:403

What to do

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

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

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

  • hoj-vue/src/i18n/index.js:3 imports element-ui/lib/locale/lang/en, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — hoj-vue/src/i18n/index.js:3
  • hoj-vue/src/i18n/index.js:4 imports element-ui/lib/locale/lang/zh-CN, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — hoj-vue/src/i18n/index.js:4
  • hoj-vue/src/i18n/index.js:5 imports element-ui/lib/locale/lang/zh-TW, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — hoj-vue/src/i18n/index.js:5
  • hoj-vue/src/i18n/index.js:6 imports element-ui/lib/locale/lang/ja, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — hoj-vue/src/i18n/index.js:6
  • hoj-vue/src/i18n/index.js:7 imports element-ui/lib/locale/lang/ko, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — hoj-vue/src/i18n/index.js:7
  • hoj-vue/src/i18n/index.js:8 imports vxe-table/lib/locale/lang/en-US, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — hoj-vue/src/i18n/index.js:8
  • hoj-vue/src/i18n/index.js:9 imports vxe-table/lib/locale/lang/zh-CN, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — hoj-vue/src/i18n/index.js:9
  • hoj-vue/src/i18n/index.js:10 imports vxe-table/lib/locale/lang/zh-TW, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — hoj-vue/src/i18n/index.js:10
  • hoj-vue/src/i18n/index.js:11 imports vxe-table/lib/locale/lang/ja-JP, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — hoj-vue/src/i18n/index.js:11
  • hoj-vue/src/i18n/index.js:12 imports vxe-table/lib/locale/lang/en-US, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — hoj-vue/src/i18n/index.js:12

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity9.7 / 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.

  • submit has cyclomatic complexity 65 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — hoj-vue/src/views/admin/problem/Problem.vue:1511
  • submit has cyclomatic complexity 65 and cognitive complexity 147; 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. — hoj-vue/src/components/oj/group/Problem.vue:1462
  • showInitBoard has cyclomatic complexity 25 and cognitive complexity 60; 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. — hoj-scrollBoard/js/scrollboard.js:1071
  • (anonymous) has cyclomatic complexity 18 and cognitive complexity 54; 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. — hoj-vue/src/router/index.js:40
  • decrypt has cyclomatic complexity 18 and cognitive complexity 53; 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) — hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:632, hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:632
  • encrypt has cyclomatic complexity 18 and cognitive complexity 52; 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) — hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:565, hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:565
  • (anonymous) has cyclomatic complexity 17 and cognitive complexity 43; 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. — hoj-vue/src/common/api.js:80
  • cellClassName has cyclomatic complexity 17 and cognitive complexity 15; 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. — hoj-vue/src/views/oj/contest/children/ACMContestRank.vue:583
  • saveContest has cyclomatic complexity 16 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 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. — hoj-vue/src/views/admin/contest/Contest.vue:773
  • cellClassName has cyclomatic complexity 15 and cognitive complexity 15; 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. — hoj-vue/src/views/oj/contest/children/OIContestRank.vue:502
  • submit has cyclomatic complexity 15 and cognitive complexity 12; 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. — hoj-vue/src/components/oj/group/Contest.vue:792
  • init has cyclomatic complexity 14 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — hoj-scrollBoard/js/scrollboard.js:831
  • $route has cyclomatic complexity 14 and cognitive complexity 10; 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. — hoj-vue/src/views/oj/group/GroupDetails.vue:540
  • submitDiscussion has cyclomatic complexity 13 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 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. — hoj-vue/src/views/oj/discussion/discussionList.vue:692
  • (anonymous) has cyclomatic complexity 12 and cognitive complexity 24; 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. — hoj-scrollBoard/js/scrollboard.js:1334
  • formatSpecificDuration has cyclomatic complexity 12 and cognitive complexity 24; 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. — hoj-vue/src/common/time.js:20
  • autoChangeLanguge 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. — hoj-vue/src/App.vue:159
  • resizeWatchHeight 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. — hoj-vue/src/views/oj/problem/Problem.vue:1174
  • str2rstr_utf8 has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — hoj-scrollBoard/js/scrollboard.js:162
  • saveTraining has cyclomatic complexity 11 and cognitive complexity 10; 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. — hoj-vue/src/views/admin/training/Training.vue:171
R3 · Large Files0.0 / 10Critical✓ 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.

  • hoj-vue/src/views/oj/problem/Problem.vue has 2115 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/problem/Problem.vue:1
  • hoj-vue/src/views/admin/problem/Problem.vue has 1884 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/admin/problem/Problem.vue:1
  • hoj-vue/src/components/oj/group/Problem.vue has 1839 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/components/oj/group/Problem.vue:1
  • hoj-vue/src/common/api.js has 1781 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/common/api.js:1
  • hoj-scrollBoard/js/scrollboard.js has 1306 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-scrollBoard/js/scrollboard.js:1
  • hoj-vue/src/components/oj/comment/comment.vue has 1261 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/components/oj/comment/comment.vue:1
  • hoj-vue/src/views/oj/status/SubmissionList.vue has 1109 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/status/SubmissionList.vue:1
  • hoj-vue/src/components/oj/group/Contest.vue has 1029 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/components/oj/group/Contest.vue:1
  • hoj-vue/src/components/oj/common/CodeMirror.vue has 1023 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/components/oj/common/CodeMirror.vue:1
  • hoj-vue/src/views/admin/contest/Contest.vue has 1004 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/admin/contest/Contest.vue:1
  • hoj-vue/src/components/oj/common/NavBar.vue has 959 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/components/oj/common/NavBar.vue:1
  • hoj-vue/src/views/oj/discussion/discussionList.vue has 921 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/discussion/discussionList.vue:1
  • hoj-vue/src/views/admin/general/User.vue has 915 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/admin/general/User.vue:1
  • hoj-vue/src/App.vue has 852 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/App.vue:1
  • hoj-vue/src/views/oj/problem/ProblemList.vue has 836 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/problem/ProblemList.vue:1
  • hoj-vue/src/views/oj/contest/children/ACMContestRank.vue has 807 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/contest/children/ACMContestRank.vue:1
  • REDACTED has 740 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • hoj-vue/src/views/admin/Home.vue has 734 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/admin/Home.vue:1
  • hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue has 704 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue:1
  • hoj-vue/src/views/oj/contest/children/OIContestRank.vue has 692 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/contest/children/OIContestRank.vue:1
  • hoj-vue/src/views/oj/group/GroupList.vue has 679 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/group/GroupList.vue:1
  • hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js has 677 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:1
  • hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js has 677 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:1
  • hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue has 664 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue:1
  • hoj-vue/src/views/admin/problem/ProblemList.vue has 653 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/admin/problem/ProblemList.vue:1
  • hoj-vue/src/views/oj/status/SubmissionDetails.vue has 622 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/status/SubmissionDetails.vue:1
  • hoj-vue/src/views/oj/group/GroupDetails.vue has 615 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/group/GroupDetails.vue:1
  • hoj-vue/src/views/oj/contest/ContestDetails.vue has 607 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/contest/ContestDetails.vue:1
  • hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue has 598 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:1
  • hoj-vue/src/views/oj/group/children/GroupContestList.vue has 578 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/group/children/GroupContestList.vue:1
  • hoj-vue/src/views/oj/user/UserHome.vue has 574 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/user/UserHome.vue:1
  • hoj-vue/src/views/oj/group/children/GroupSetting.vue has 547 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/group/children/GroupSetting.vue:1
  • hoj-vue/src/views/oj/contest/ContestList.vue has 501 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/contest/ContestList.vue:1
  • hoj-vue/src/components/oj/setting/Account.vue has 485 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/components/oj/setting/Account.vue:1
  • hoj-vue/src/views/admin/general/SystemConfig.vue has 465 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/admin/general/SystemConfig.vue:1
  • hoj-vue/src/components/oj/group/ProblemList.vue has 457 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/components/oj/group/ProblemList.vue:1
  • hoj-vue/src/views/oj/training/TrainingRank.vue has 452 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/training/TrainingRank.vue:1
  • hoj-vue/src/components/oj/setting/UserInfo.vue has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/components/oj/setting/UserInfo.vue:1
  • hoj-vue/src/views/oj/discussion/discussion.vue has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/oj/discussion/discussion.vue:1
  • hoj-vue/src/views/admin/discussion/Discussion.vue has 446 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — hoj-vue/src/views/admin/discussion/Discussion.vue:1

What to do

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

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

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

  • 0% of 131 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count

What to do

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

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

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

R6 · Tooling0.0 / 10Critical✓ 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.

  • test ✗ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add a test runner (vitest / jest / playwright) and eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
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 4 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 (4 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 (×27) — hoj-vue/src/common/api.js, hoj-vue/src/views/admin/problem/Problem.vue, hoj-vue/src/views/oj/problem/Problem.vue, …
  • no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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 (×10) — hoj-vue/src/i18n/oj/ja-JP.js, hoj-vue/src/i18n/oj/ko-KR.js, hoj-vue/src/i18n/oj/zh-CN.js, …
  • no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/views/oj/contest/children/ContestRank.vue) — 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 (×2) — hoj-vue/src/views/oj/contest/children/ACMContestRank.vue, hoj-vue/src/views/oj/contest/children/OIContestRank.vue

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene8.0 / 10Strong✓ 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 hoj-vue/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. (×4) — hoj-vue/package.json:48, hoj-vue/package.json:49, hoj-vue/package.json:14, …

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.

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.

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

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

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

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

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

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

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.

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 unescaped5.0 / 10Adequate✓ 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.

  • `problemHTML` is text this program did not author, and it is written into the text of an element through the DOM library's `.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. — hoj-scrollBoard/js/scrollboard.js:1324
  • `team.solved` is text this program did not author, and it is written into the text of an element through the DOM library's `.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. — hoj-scrollBoard/js/scrollboard.js:1385
  • `websiteConfig.description` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — hoj-vue/src/App.vue:21
  • `text` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — hoj-vue/src/components/admin/KatexEditor.vue:13
  • `announcement.content` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — hoj-vue/src/components/oj/common/Announcements.vue:71
  • `html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — hoj-vue/src/components/oj/common/Markdown.vue:13
  • `$markDown.render(item.content)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — hoj-vue/src/views/oj/message/SysMsg.vue:54
  • `item.sourceContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — hoj-vue/src/views/oj/message/UserMsg.vue:63
  • `item.quoteContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — hoj-vue/src/views/oj/message/UserMsg.vue:69
  • `problemData.problem.source` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — hoj-vue/src/views/oj/problem/Problem.vue:297

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.
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X3 · Exception handling5.4 / 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. (×2) — hoj-vue/src/App.vue:255, hoj-vue/src/views/oj/problem/Problem.vue:1257
  • `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×13) — hoj-vue/src/views/oj/status/SubmissionDetails.vue:499, hoj-vue/src/views/oj/status/SubmissionList.vue:962, hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:352, …
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×24) — hoj-vue/src/views/oj/status/SubmissionList.vue:978, hoj-vue/src/views/oj/status/SubmissionList.vue:1019, hoj-vue/src/views/oj/problem/Problem.vue:1471, …
  • `.then(…, (res) => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — hoj-vue/src/views/oj/problem/Problem.vue:1563

What to do

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

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

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

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

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

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

  • `info` at line 53 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/StartupRunner.java:53
  • `info` at line 54 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/StartupRunner.java:54
  • `info` at line 92 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/StartupRunner.java:92

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether Java packages are null-marked and not undermined by heavy nullness suppression — a package under `@NullMarked` (or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, or a NullAway/Checker Framework configuration naming it) makes an unannotated reference exclude null, and `@SuppressWarnings("NullAway")`, `("nullness")`, `("null")` and `castToNonNull(…)` are what silence it.

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

  • 0/135 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.

What to do

  • Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).

WCAG coverage — what static analysis assessed

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

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

Not statically assessed — these 42 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.3, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 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 Health17.6Critical — gated by R1, R10, R3, R7, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture70.7Adequate — gated by D26, R11Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity67.1Adequate — gated by D34Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness22.0Critical — gated by R4, R6, P1, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security42.9Checked 3 of 9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility36.2Weak — gated by AC1, AC2, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 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.

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 54 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.

  • AC6 Visual & motion safety — Visual & motion safety could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .java suite was found but not re-run
  • D12 Dependency Hygiene — Not scored — a Maven build resolved 77 artifact(s) (72 behind a shipped release, reported), but the build resolved only part of the graph, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • 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.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — no CI workflow found
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a REDACTED, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Java was read, and no request in it can be cancelled by a caller — a Java request off Android takes no token: it is cancelled through the handle it returns (Future.cancel, Call.cancel, a Disposable), ambiently (io.grpc.Context) or by interrupting its thread, not through a parameter
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — X27 reached only 47% of this repository's production lines — javascript (57,507 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 170 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×72
  • 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
  • + 47 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Critical CVE · ×24
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <span> · ×18
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:65 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:84 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:104 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:122 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:140 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:181 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:196 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:235 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:245 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:255 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:401 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:420 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:440 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:458 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/components/oj/comment/comment.vue:476 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/views/admin/general/SystemConfig.vue:124 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/views/admin/general/SystemConfig.vue:130 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> hoj-vue/src/views/admin/general/SystemConfig.vue:137 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
D28 · Secrets (history) · High secret · ×13
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · Custom control named only by title on <span> · ×10
  • Custom control named only by title on <span> hoj-vue/src/components/oj/comment/comment.vue:65 — This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
  • Custom control named only by title on <span> hoj-vue/src/components/oj/comment/comment.vue:84 — This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
  • Custom control named only by title on <span> hoj-vue/src/components/oj/comment/comment.vue:104 — This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
  • Custom control named only by title on <span> hoj-vue/src/components/oj/comment/comment.vue:122 — This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
  • Custom control named only by title on <span> hoj-vue/src/components/oj/comment/comment.vue:140 — This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
  • Custom control named only by title on <span> hoj-vue/src/components/oj/comment/comment.vue:401 — This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
  • Custom control named only by title on <span> hoj-vue/src/components/oj/comment/comment.vue:420 — This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
  • Custom control named only by title on <span> hoj-vue/src/components/oj/comment/comment.vue:440 — This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
  • Custom control named only by title on <span> hoj-vue/src/components/oj/comment/comment.vue:458 — This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
  • Custom control named only by title on <span> hoj-vue/src/components/oj/comment/comment.vue:476 — This <span> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
AC2 · Forms & labels · <label> that labels no control · ×7
  • <label> that labels no control hoj-vue/src/components/oj/setting/UserInfo.vue:177 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:129 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:137 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:144 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:151 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:157 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:225 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC1 · Text alternatives · <img> without a text alternative · ×5
  • <img> without a text alternative hoj-vue/src/components/oj/common/ResetPassword.vue:23 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative hoj-vue/src/components/oj/setting/UserInfo.vue:116 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative hoj-vue/src/views/oj/group/children/GroupContestList.vue:142 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative hoj-vue/src/views/oj/group/children/GroupContestList.vue:148 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative hoj-vue/src/views/oj/group/children/GroupSetting.vue:114 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels · Custom control with no accessible name on <span> · ×3
  • Custom control with no accessible name on <span> hoj-vue/src/views/admin/general/SystemConfig.vue:124 — This <span> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <span> hoj-vue/src/views/admin/general/SystemConfig.vue:130 — This <span> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <span> hoj-vue/src/views/admin/general/SystemConfig.vue:137 — This <span> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text hoj-vue/src/components/oj/common/ProblemHorizontalMenu.vue:7 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text hoj-vue/src/components/oj/common/ProblemHorizontalMenu.vue:71 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels · Link with no accessible name · ×2
  • Link with no accessible name hoj-vue/src/views/oj/about/Developer.vue:13 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name hoj-vue/src/views/oj/about/Developer.vue:19 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
D30 · Dependency Vulnerabilities · High vulnerability · ×2
  • REDACTED
  • REDACTED
AC2 · Forms & labels · Custom control with no accessible name on <footer> · ×1
  • Custom control with no accessible name on <footer> hoj-vue/src/components/admin/Accordion.vue:12 — This <footer> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels · Custom control with no accessible name on <img> · ×1
  • Custom control with no accessible name on <img> hoj-vue/src/components/oj/common/ResetPassword.vue:23 — This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels · Custom control with no accessible name on <i> · ×1
  • Custom control with no accessible name on <i> hoj-vue/src/views/admin/Home.vue:127 — This <i> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC3 · Page structure · <html> without a lang · ×1
  • <html> without a lang hoj-scrollBoard/index.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC4 · Keyboard semantics · Click handler on a non-interactive <footer> · ×1
  • Click handler on a non-interactive <footer> hoj-vue/src/components/admin/Accordion.vue:12 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <li> · ×1
  • Click handler on a non-interactive <li> hoj-vue/src/components/oj/common/ProblemHorizontalMenu.vue:36 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <img> · ×1
  • Click handler on a non-interactive <img> hoj-vue/src/components/oj/common/ResetPassword.vue:23 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×1
  • Click handler on a non-interactive <div> hoj-vue/src/views/admin/Home.vue:14 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <i> · ×1
  • Click handler on a non-interactive <i> hoj-vue/src/views/admin/Home.vue:127 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
D13 · REDACTED Scanning · Leaked secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical vulnerability · ×1
  • REDACTED
Serious — 846 finding(s)
X3 · Exception handling · Swallowed exception (empty catch) · ×40
  • Swallowed exception (empty catch) hoj-vue/src/App.vue:255 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/status/SubmissionDetails.vue:499 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/status/SubmissionList.vue:962 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/status/SubmissionList.vue:978 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/status/SubmissionList.vue:1019 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/problem/Problem.vue:1257 — 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) hoj-vue/src/views/oj/problem/Problem.vue:1471 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/problem/Problem.vue:1510 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/problem/Problem.vue:1563 — `.then(…, (res) => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/group/GroupDetails.vue:441 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/group/GroupDetails.vue:462 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/group/GroupDetails.vue:489 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:352 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/contest/children/ACMInfoAdmin.vue:206 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/oj/contest/children/ContestRejudgeAdmin.vue:75 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/admin/Dashboard.vue:314 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/admin/Dashboard.vue:321 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/admin/training/Category.vue:105 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/admin/training/Category.vue:113 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/admin/training/Training.vue:168 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/admin/training/Training.vue:236 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/admin/training/TrainingProblemList.vue:338 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/admin/training/TrainingProblemList.vue:346 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/admin/training/TrainingProblemList.vue:354 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) hoj-vue/src/views/admin/training/TrainingProblemList.vue:362 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • + 15 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium CVE · ×27
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×17
  • Duplicated block (8 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:199 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:199-206 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:258-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:199` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:790 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:790-797 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:313-320 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:790` it begins part-way through the construct above it, so those 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: `Constants` names `top.hcode.hoj.util.Constants` in one and `top.hcode.hoj.utils.Constants` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:71 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:71-78 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:83-90 — 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 (8 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:256 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:256-264 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:517-524 — both copies are in the same file, so extract the 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:174 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:174-181 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:459-466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:174` it does not close everything it opens, so those 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:456` calls `size` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:171` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:283 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:283-290 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:318-325 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:295 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:295-302 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:593-600 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:295` it begins part-way through the construct above it, so those exact lines 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:288 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:288-295 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:324-331 — both copies are in the same file, so extract the 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:286` calls `getSubject`, `hasRole` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:323` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/bo/Pair_.java:35 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/bo/Pair_.java:35-42 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/Pair_.java:35-42 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/bo/Pair_.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/Pair_.java` 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:419 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:419-426 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java:296-303 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java:295` calls `isNotEmpty` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:418` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:340 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:340-347 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:452-459 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:340` it begins part-way through the construct above it, so those exact lines 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) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:89 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:89-96 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:127-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1291 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1291-1298 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1271-1278 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1564 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1564-1571 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1544-1551 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1914 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1914-1921 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1894-1901 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/Constants.java:379 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/Constants.java:379-386 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/Constants.java:132-139 — 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 (8 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminProblemServiceImpl.java:99 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminProblemServiceImpl.java:99-106 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/impl/RejudgeServiceImpl.java:35-42 — 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.
AC4 · Keyboard semantics · Anchor without href · ×14
  • Anchor without href hoj-vue/src/App.vue:36 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/App.vue:39 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/App.vue:58 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/App.vue:72 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/components/oj/comment/comment.vue:520 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/views/oj/contest/ContestList.vue:121 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/views/oj/discussion/discussion.vue:18 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/views/oj/discussion/discussion.vue:53 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/views/oj/discussion/discussion.vue:68 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/views/oj/discussion/discussion.vue:74 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/views/oj/discussion/discussion.vue:83 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/views/oj/discussion/discussion.vue:105 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/views/oj/discussion/discussionList.vue:279 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href hoj-vue/src/views/oj/discussion/discussionList.vue:290 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×14
  • Duplicated block (11 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1279 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1279-1289 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1259-1269 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:102 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:102-112 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionEntityServiceImpl.java:42-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:101` calls `setSourceContent` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionEntityServiceImpl.java:41` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:625 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:625-635 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:709-719 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:625` it begins part-way through the construct above it, so those exact lines 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:231 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:231-241 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:173-183 — 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 (11 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:276 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:276-286 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:308-318 — 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 (11 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java:121 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java:121-131 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/SystemConfigServiceImpl.java:21-31 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java:132` calls `put` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/SystemConfigServiceImpl.java:32` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:181 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:181-191 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:238-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. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java: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.
  • Duplicated block (11 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:162 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:162-172 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:144-154 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java: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 (11 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:273 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:273-283 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:159-169 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:157` calls `Transactional` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:270` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:395 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:395-405 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:375-385 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:176 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:176-186 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:236-246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:115 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:115-125 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:168-178 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java: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 (11 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:655 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:655-665 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:635-645 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (11 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:793 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:793-803 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:773-783 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (7 lines × 2) · ×14
  • Duplicated block (7 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:65 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:65-71 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/ReplyEntityServiceImpl.java:52-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:101 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:101-107 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:79-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.
  • Duplicated block (7 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:202 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:202-208 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:125-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.
  • Duplicated block (7 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:297 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:297-303 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:351-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:297` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:166 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:166-172 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:196-202 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:87 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:87-93 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:120-126 — both copies are in the same file, so extract the 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:114 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:114-120 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:406-412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:114` it does not close everything it opens, so those exact lines 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:294 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:294-300 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:327-333 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:294` it begins part-way through the construct above it, so those exact lines 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) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:106 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:106-112 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:129-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:106` it does not close everything it opens, so those exact lines 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) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeContext.java:42 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeContext.java:42-48 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeContext.java:80-86 — both copies are in the same file, so extract the 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) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:859 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:859-865 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:839-845 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:40 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:40-46 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:46-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JsoupUtils.java:67 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JsoupUtils.java:67-73 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JsoupUtils.java:42-48 — 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 (7 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:321 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:321-327 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:445-451 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:321` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×13
  • Duplicated block (10 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1038 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1038-1047 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1018-1027 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1513 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1513-1522 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1493-1502 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1582 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1582-1591 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1562-1571 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:105 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:105-114 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java:144-153 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java:144` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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.
  • Duplicated block (10 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:131 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:131-140 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:176-185 — both copies are in the same file, so extract the 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:320 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:320-329 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:208-217 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java` 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. If that is what happened, the fix is to keep one copy and have the 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:320` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:50 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:50-59 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:76-85 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/AdminNoticeManager.java:71 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/AdminNoticeManager.java:71-80 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java:85-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:154 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:154-163 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:197-206 — before extracting anything, compare `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:154` it begins part-way through the construct above it, so those 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, `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:153` calls `getStdout` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:196` 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 × 2) REDACTED:48 — REDACTED:48-57 | REDACTED:46-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:242 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:242-251 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:377-386 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:242` 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 (10 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:939 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:939-948 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:919-928 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JsoupUtils.java:74 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JsoupUtils.java:74-83 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JsoupUtils.java:50-59 — 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 (9 lines × 2) · ×13
  • Duplicated block (9 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:697 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:697-705 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java:87-95 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:697` it does not close everything it opens, so those 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: `Constants` names `top.hcode.hoj.util.Constants` in one and `top.hcode.hoj.utils.Constants` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:154 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:154-162 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:265-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:319 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:319-327 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:380-388 — both copies are in the same file, so extract the 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:169 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:169-177 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:375-383 — both copies are in the same file, so extract the 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:167` calls `StatusFailException` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:374` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:349 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:349-357 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:460-468 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:349` 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 (9 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:90 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:90-98 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeReceiver.java:76-84 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:161 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:161-169 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:184-192 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:331 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:331-339 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:311-319 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:621 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:621-629 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:601-609 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:675 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:675-683 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:655-663 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1064 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1064-1072 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1044-1052 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1102 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1102-1110 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1082-1090 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:2076 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:2076-2084 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:2056-2064 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (4 members, 50+ identical tokens) · ×12
  • Members sharing a duplicated core (4 members, 50+ identical tokens) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:551 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:551-645 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:654-720 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java:46-111 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java:118-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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:373 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:373-394 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:415-436 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java:47-68 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java:88-109 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:127 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:127-148 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:151-208 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:157-207 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:210-296 — 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:74 — REDACTED:74-115 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:62-154 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:62-224 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:65-264 — 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:117 — REDACTED:117-315 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:62-154 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:62-224 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:65-264 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:62 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:62-154 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:62-224 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:65-264 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:53-164 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java:40 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java:40-50 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/MarkDownFileServiceImpl.java:28-38 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/MarkDownFileServiceImpl.java:53-63 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/TestCaseServiceImpl.java:29-39 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:31 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:31-39 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:28-36 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:39-47 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java:29-37 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java:45 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java:45-55 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java:87-98 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:79-90 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:94-105 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java:82 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java:82-92 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java:63-74 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java:77-88 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java:91-102 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java:43 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java:43-53 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/TrainingServiceImpl.java:39-49 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/TrainingServiceImpl.java:52-62 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/TrainingServiceImpl.java:86-96 — 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) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:48 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:48-105 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:68-127 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:56-146 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java:47-117 — 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.
D3 · God Classes · MethodTooLong · ×10
  • MethodTooLong: ProblemEntityServiceImpl.adminUpdateProblem hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:112 — MethodTooLong — adminUpdateProblem runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× 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: ImportFpsProblemManager.parseFps REDACTED:117 — MethodTooLong — parseFps runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ProblemFileManager.importProblem hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:65 — MethodTooLong — importProblem runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ProblemFileManager.exportProblem hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:275 — MethodTooLong — exportProblem runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.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: ContestFileManager.downloadContestACSubmission hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:150 — MethodTooLong — downloadContestACSubmission runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× 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: SandboxRun.interactTestCase hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:510 — MethodTooLong — interactTestCase runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ImportQDUOJProblemManager.importQDOJProblem hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:62 — MethodTooLong — importQDOJProblem runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× 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: HomeManager.buildSubmissionStatisticsVo hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:226 — MethodTooLong — buildSubmissionStatisticsVo 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.
  • MethodTooLong: CFProblemStrategy.getProblemInfo hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:49 — MethodTooLong — getProblemInfo runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ProblemEntityServiceImpl.adminAddProblem hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:394 — MethodTooLong — adminAddProblem runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
R11 · Import Boundaries · Boundary violation [package · ×10
  • Boundary violation [package:third-party-deep-import] hoj-vue/src/i18n/index.js:3 — hoj-vue/src/i18n/index.js:3 imports element-ui/lib/locale/lang/en, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] hoj-vue/src/i18n/index.js:4 — hoj-vue/src/i18n/index.js:4 imports element-ui/lib/locale/lang/zh-CN, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] hoj-vue/src/i18n/index.js:5 — hoj-vue/src/i18n/index.js:5 imports element-ui/lib/locale/lang/zh-TW, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] hoj-vue/src/i18n/index.js:6 — hoj-vue/src/i18n/index.js:6 imports element-ui/lib/locale/lang/ja, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] hoj-vue/src/i18n/index.js:7 — hoj-vue/src/i18n/index.js:7 imports element-ui/lib/locale/lang/ko, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] hoj-vue/src/i18n/index.js:8 — hoj-vue/src/i18n/index.js:8 imports vxe-table/lib/locale/lang/en-US, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] hoj-vue/src/i18n/index.js:9 — hoj-vue/src/i18n/index.js:9 imports vxe-table/lib/locale/lang/zh-CN, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] hoj-vue/src/i18n/index.js:10 — hoj-vue/src/i18n/index.js:10 imports vxe-table/lib/locale/lang/zh-TW, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] hoj-vue/src/i18n/index.js:11 — hoj-vue/src/i18n/index.js:11 imports vxe-table/lib/locale/lang/ja-JP, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] hoj-vue/src/i18n/index.js:12 — hoj-vue/src/i18n/index.js:12 imports vxe-table/lib/locale/lang/en-US, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×10
  • Untrusted text written into markup unescaped hoj-scrollBoard/js/scrollboard.js:1324 — `problemHTML` is text this program did not author, and it is written into the text of an element through the DOM library's `.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 hoj-scrollBoard/js/scrollboard.js:1385 — `team.solved` is text this program did not author, and it is written into the text of an element through the DOM library's `.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 hoj-vue/src/App.vue:21 — `websiteConfig.description` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped hoj-vue/src/components/admin/KatexEditor.vue:13 — `text` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped hoj-vue/src/components/oj/common/Announcements.vue:71 — `announcement.content` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped hoj-vue/src/components/oj/common/Markdown.vue:13 — `html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped hoj-vue/src/views/oj/message/SysMsg.vue:54 — `$markDown.render(item.content)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped hoj-vue/src/views/oj/message/UserMsg.vue:63 — `item.sourceContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped hoj-vue/src/views/oj/message/UserMsg.vue:69 — `item.quoteContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped hoj-vue/src/views/oj/problem/Problem.vue:297 — `problemData.problem.source` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
D3 · God Classes · FileTooLong · ×8
  • FileTooLong: pool/DruidAbstractDataSource.java hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java — FileTooLong — 1380 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: DruidAbstractDataSource (61-2118). The bar is 500 significant lines; this is 880 over it, 2.76× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: pool/DruidAbstractDataSource.java hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java — FileTooLong — 1359 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: DruidAbstractDataSource (41-2098). The bar is 500 significant lines; this is 859 over it, 2.72× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: common/api.js hoj-vue/src/common/api.js — FileTooLong — 1059 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 559 over it, 2.12× 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: js/scrollboard.js hoj-scrollBoard/js/scrollboard.js — FileTooLong — 814 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 314 over it, 1.63× 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: impl/ProblemEntityServiceImpl.java hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java — FileTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ProblemEntityServiceImpl (52-820). The bar is 500 significant lines; this is 37 over it, 1.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: resources/CodeForcesAES.js hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js — FileTooLong — 513 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: slowAES (21-722). The bar is 500 significant lines; this is 13 over it, 1.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: resources/CodeForcesAES.js hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js — FileTooLong — 513 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: slowAES (21-722). The bar is 500 significant lines; this is 13 over it, 1.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: config/StartupRunner.java hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java — FileTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: StartupRunner (38-716). The bar is 500 significant lines; this is 5 over it, 1.01× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×8
  • Duplicated block (6 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java:77 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java:77-82 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java:178-183 — both copies are in the same file, so extract the 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:88 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:88-93 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:97-104 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:88` it begins part-way through the construct above it, so those exact lines 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:215 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:215-220 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:306-311 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:215` it does not close everything it opens, so those exact lines 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:244 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:244-251 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:282-287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:244` it begins part-way through the construct above it, so those exact lines 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) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:164 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:164-169 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:225-230 — both copies are in the same file, so extract the 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/HDUProblemStrategy.java:31 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/HDUProblemStrategy.java:31-36 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/POJProblemStrategy.java:26-31 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/POJProblemStrategy.java:32` calls `replaceAll` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/HDUProblemStrategy.java:37` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:222 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:222-227 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:163-168 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java:51 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java:51-56 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java:113-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java:110` calls `size` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java:50` 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 × 2) · ×7
  • Duplicated block (15 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java:29 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java:29-43 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/SwaggerConfig.java:29-43 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/SwaggerConfig.java` 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java:57 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java:57-71 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java:102-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java:72` calls `orderByAsc` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java:117` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:178 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:178-192 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:239-253 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:178` it begins part-way through the construct above it, so those 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:195` calls `getById`, `getId` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:255` 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 (15 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:134 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:134-148 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:193-207 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:134` 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:192` calls `setGid` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:133` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:626 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:626-640 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:643-657 — both copies are in the same file, so extract the 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:215 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:215-229 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:268-282 — 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 (15 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java:46 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java:46-60 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/SwaggerConfig.java:46-60 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/SwaggerConfig.java` 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. The matched lines also transfer control out of the body holding them, 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 (5 lines × 2) · ×7
  • Duplicated block (5 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:107 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:107-115 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:500-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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:109 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:109-113 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:86-90 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:238 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:238-244 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:279-283 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:238` it does not close everything it opens, so those exact lines 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:98 — REDACTED:98-102 | REDACTED:113-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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:98` 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:120 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:120-124 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java:331-335 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:381 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:381-385 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java:467-471 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:175 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:175-179 | REDACTED:397-401 — 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.
D3 · God Classes · ClassTooLong · ×6
  • ClassTooLong: DruidAbstractDataSource hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:61 — ClassTooLong — 1327 significant lines (blank, comment-only and punctuation-only lines excluded), 243 methods. The bar is 400 significant lines; this is 927 over it, 3.32× 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: DruidAbstractDataSource hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:41 — ClassTooLong — 1327 significant lines (blank, comment-only and punctuation-only lines excluded), 243 methods. The bar is 400 significant lines; this is 927 over it, 3.32× 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: ProblemEntityServiceImpl hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:52 — ClassTooLong — 497 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 97 over it, 1.24× 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: StartupRunner hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:38 — ClassTooLong — 476 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 76 over it, 1.19× 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: JudgeManager hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java:57 — ClassTooLong — 446 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 46 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ContestCalculateRankManager hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:34 — ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 31 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×6
  • Duplicated block (12 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1301 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1301-1312 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1281-1292 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:355 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:355-366 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:251-262 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:355` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:555 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:555-566 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScoreboardManager.java:80-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:553` calls `getCurrentPage`, `getLimit` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScoreboardManager.java: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.
  • Duplicated block (12 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupTrainingEntityServiceImpl.java:49 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupTrainingEntityServiceImpl.java:49-60 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingEntityServiceImpl.java:54-65 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupTrainingEntityServiceImpl.java:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:799 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:799-810 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:322-333 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:799` it begins part-way through the construct above it, so those 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: `Pair_` names `top.hcode.hoj.judge.entity.Pair_` in one and `top.hcode.hoj.pojo.bo.Pair_` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:813` calls `getScore` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:336` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1499 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1499-1510 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1479-1490 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (8 lines × 4) · ×6
  • Duplicated block (8 lines × 4) REDACTED:238 — REDACTED:238-245 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:101-108 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:132-139 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:136-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (8 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:166 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:166-174 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:108-116 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:148-156 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:276-283 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:273` calls `getById` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:162` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java:43 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java:43-50 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/MarkDownFileServiceImpl.java:31-38 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/MarkDownFileServiceImpl.java:56-63 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/TestCaseServiceImpl.java:32-39 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java:48 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java:48-55 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java:91-98 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:83-90 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:98-105 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java:48` it begins part-way through the construct above it, so those exact lines 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java:85 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java:85-92 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java:67-74 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java:81-88 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java:95-102 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java:46 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java:46-53 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/TrainingServiceImpl.java:42-49 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/TrainingServiceImpl.java:55-62 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/TrainingServiceImpl.java:89-96 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 · Cohesion (LCOM4) · Low cohesion · ×6
  • Low cohesion: GlobalExceptionAdvice (LCOM4 13) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/advice/GlobalExceptionAdvice.java:49 — GlobalExceptionAdvice's methods fall into 13 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 13 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: ScheduleServiceImpl (LCOM4 7) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleServiceImpl.java:73 — ScheduleServiceImpl's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CommonManager (LCOM4 5) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommonManager.java:27 — CommonManager's methods fall into 5 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 5 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: HomeManager (LCOM4 5) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:39 — HomeManager's methods fall into 5 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 5 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: ShiroConfig (LCOM4 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/ShiroConfig.java:33 — ShiroConfig's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ConfigManager (LCOM4 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java:46 — ConfigManager's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×5
  • Edited copy of a member (9 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/bo/Pair_.java:34 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/bo/Pair_.java:34-42 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/Pair_.java:34-42 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java:104 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java:104-121 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java:135-143 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java:71 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java:71-79 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ProblemServiceImpl.java:75-85 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:124 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:124-132 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestScoreboardServiceImpl.java:40-48 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/account/impl/AdminAccountServiceImpl.java:28 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/account/impl/AdminAccountServiceImpl.java:28-36 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java:56-65 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:125 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:125-137 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:129-141 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:393 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:393-405 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:417-429 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:393` it begins part-way through the construct above it, so those exact lines 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:187 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:187-199 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:262-274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:187` it begins part-way through the construct above it, so those exact lines 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:196 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:196-208 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:255-267 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:196` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:195` calls `getById`, `getId` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:253` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1151 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1151-1163 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1131-1143 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (7 lines × 3) · ×5
  • Duplicated block (7 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:60 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:60-66 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:53-59 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:79-85 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (7 lines × 3) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:84 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:84-96 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:116-122 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:135-141 — before extracting anything, compare `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java:64 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java:64-70 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java:80-86 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java:91-97 — 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 `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java:72` calls `checkResult`, `processMultiple` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java:88` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupAnnouncementEntityServiceImpl.java:27 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupAnnouncementEntityServiceImpl.java:27-33 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupAnnouncementEntityServiceImpl.java:36-42 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupContestEntityServiceImpl.java:27-33 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/AccountServiceImpl.java:34 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/AccountServiceImpl.java:34-40 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/AccountServiceImpl.java:43-49 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestScrollBoardServiceImpl.java:34-40 — 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.
D17 · Explicit Debt · TodoComment · ×4
  • TodoComment REDACTED:185 — // 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:189 — // 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:199 — // 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:204 — // 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×4
  • Edited copy of a member (13 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java:69 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java:69-81 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:268-280 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) REDACTED:90 — REDACTED:90-102 | REDACTED:105-117 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/NacosSwitchConfig.java:135 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/NacosSwitchConfig.java:135-149 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/NacosSwitchConfig.java:151-163 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:257 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:257-269 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:123-136 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×4
  • Duplicated block (19 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:370 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:370-388 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:350-368 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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:36 — REDACTED:36-54 | REDACTED:19-37 — 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 (19 lines × 2) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCountEntityServiceImpl.java:69 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCountEntityServiceImpl.java:69-87 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java:101-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — 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 `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCountEntityServiceImpl.java:69` 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 (19 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/exception/AccessException.java:8 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/exception/AccessException.java:8-26 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/exception/ProblemIDRepeatException.java:8-26 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:128 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:128-143 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:180-195 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java` as WHOLE FILES: this scan already matched 4 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:197` calls `setIsGroup` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:145` 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 (16 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:186 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:186-201 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:245-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:186` it does not close everything it opens, so those exact lines 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScrollBoardManager.java:53 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScrollBoardManager.java:53-68 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScrollBoardManager.java:115-130 — both copies are in the same file, so extract the 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) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:28 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:28-43 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java:27-42 — before extracting anything, compare `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:399 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:399-412 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java:73-86 — 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:67 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:67-80 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:104-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:188 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:188-201 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:259-272 — both copies are in the same file, so extract the 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/FileEntityEntityServiceImpl.java:98 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/FileEntityEntityServiceImpl.java:98-111 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/FileEntityEntityServiceImpl.java:158-171 — both copies are in the same file, so extract the 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 (9 lines × 3) · ×4
  • Duplicated block (9 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java:57 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java:57-65 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java:132-140 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:52-60 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java: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 (9 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:166 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:166-174 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:108-116 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:148-156 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (9 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:53 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:53-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:67-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java:52-60 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) REDACTED:46 — REDACTED:46-56 | REDACTED:44-54 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/SPOJJudge.java:49-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
R7 · Dead Code · Dead file (~757 LoC) · ×4
  • Dead file (~757 LoC) hoj-vue/src/i18n/oj/ja-JP.js — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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
  • Dead file (~757 LoC) hoj-vue/src/i18n/oj/ko-KR.js — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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
  • Dead file (~757 LoC) hoj-vue/src/i18n/oj/zh-CN.js — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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
  • Dead file (~757 LoC) hoj-vue/src/i18n/oj/zh-TW.js — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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 (~465 LoC) · ×4
  • Dead file (~465 LoC) hoj-vue/src/i18n/admin/ja-JP.js — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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
  • Dead file (~465 LoC) hoj-vue/src/i18n/admin/ko-KR.js — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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
  • Dead file (~465 LoC) hoj-vue/src/i18n/admin/zh-CN.js — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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
  • Dead file (~465 LoC) hoj-vue/src/i18n/admin/zh-TW.js — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: DruidAbstractDataSource hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:61 — TooManyMethods — 243 methods. The bar is 30 methods; this is 213 over it, 8.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.
  • TooManyMethods: DruidAbstractDataSource hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:41 — TooManyMethods — 243 methods. The bar is 30 methods; this is 213 over it, 8.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.
  • TooManyMethods: RedisUtils hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/RedisUtils.java:22 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: JudgeRun.java ↔ SandboxRun.java hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:1 — `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `167f2255` add: file io; `fff965fd` support lang [pypy js php]; `de6be553` change judge params — run `git show` on any of them.
  • Change coupling: GroupDetails.vue ↔ Problem.vue hoj-vue/src/views/oj/group/GroupDetails.vue:1 — `hoj-vue/src/views/oj/group/GroupDetails.vue` and `hoj-vue/src/views/oj/problem/Problem.vue` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a8d24da3` update frontend; `bbcb53ce` add: support pdf problem view; `7c6a4186` update frontend — run `git show` on any of them.
  • Change coupling: ojRoutes.js ↔ Problem.vue hoj-vue/src/router/ojRoutes.js:1 — `hoj-vue/src/router/ojRoutes.js` and `hoj-vue/src/views/oj/problem/Problem.vue` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `a8d24da3` update frontend; `7c6a4186` update frontend; `08993118` add: problem focus mode — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×3
  • Edited copy of a member (23 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:50 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:50-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:153-179 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:99 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:99-123 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:209-236 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:385 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:385-407 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:409-431 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×3
  • Edited copy of a member (20 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java:47 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java:47-66 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java:106-131 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:167 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:167-186 | REDACTED:386-409 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/AdminNoticeManager.java:70 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/AdminNoticeManager.java:70-91 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java:84-103 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×3
  • Edited copy of a member (8 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/GroupValidator.java:26 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/GroupValidator.java:26-33 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/GroupValidator.java:35-42 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java:97 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java:97-104 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingProblemServiceImpl.java:52-59 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/Constants.java:111 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/Constants.java:111-118 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/Constants.java:89-97 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×3
  • Edited copy of a member (7 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupRankServiceImpl.java:29 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupRankServiceImpl.java:29-35 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/RankServiceImpl.java:24-30 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/impl/RejudgeServiceImpl.java:45 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/impl/RejudgeServiceImpl.java:45-51 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java:34-40 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:72 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:72-78 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeReceiver.java:56-63 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×3
  • Duplicated block (25 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:691 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:691-715 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:671-695 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:63 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:63-87 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:101-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java:1 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java:1-25 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java:1-26 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java` 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java:1` it does not close everything it opens, so those 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 lines × 2) · ×3
  • Duplicated block (23 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1001 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1001-1023 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:981-1003 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1119 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1119-1141 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1099-1121 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java:23 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java:23-45 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java:20-42 — 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 (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:149 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:149-166 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:104-121 — 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 (18 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:259 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:259-276 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:541-558 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:259` it does not close everything it opens, so those 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) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:93 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:93-110 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:97-114 — before extracting anything, compare `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×3
  • Duplicated block (15–16 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:126 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:126-141 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/ReplyEntityServiceImpl.java:85-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java: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 (15–16 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:254 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:254-268 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:363-378 — both copies are in the same file, so extract the 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–16 lines × 2) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:532 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:532-547 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:573-587 — both copies are in the same file, so extract the 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 (14–15 lines × 2) · ×3
  • Duplicated block (14–15 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/HDUProblemStrategy.java:49 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/HDUProblemStrategy.java:49-63 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/POJProblemStrategy.java:47-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14–15 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:174 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:174-187 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:204-218 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:174` it does not close everything it opens, so those 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:190` calls `getSubject`, `getPrincipal`, `info` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:220` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14–15 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:200 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:200-214 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:458-471 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×3
  • Duplicated block (12–13 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:183 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:183-195 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:276-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. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java: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 (12–13 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:428 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:428-439 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:502-514 — both copies are in the same file, so extract the 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–13 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:475 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:475-487 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:622-633 — both copies are in the same file, so extract the 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 lines × 3) · ×3
  • Duplicated block (11 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:101 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:101-111 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:132-142 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:136-146 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java` as WHOLE FILES: this scan already matched 9 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:68 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:68-78 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:41-51 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:82-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (11 lines × 3) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:35 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:35-45 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:38-48 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java:34-44 — before extracting anything, compare `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:35` 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–9 lines × 2) · ×3
  • Duplicated block (7–9 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:97 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:97-103 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java:128-136 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
  • Duplicated block (7–9 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:75 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:75-83 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:173-179 — both copies are in the same file, so extract the 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–9 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:453 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:453-461 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:490-496 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:453` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:201 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:201-206 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:142-147 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:124-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (6 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:88 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:88-93 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:100-106 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:113-119 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java: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.
  • Duplicated block (6 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:154 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:154-161 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:263-268 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:523-528 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:154` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark hoj-scrollBoard/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC4 · Keyboard semantics · Link used as a button (placeholder href) · ×2
  • Link used as a button (placeholder href) hoj-vue/src/components/oj/comment/comment.vue:53 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
  • Link used as a button (placeholder href) hoj-vue/src/components/oj/comment/comment.vue:386 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
D1 · Cyclomatic Complexity · DruidAbstractDataSource.testConnectionInternal (cyclomatic 22) · ×2
  • DruidAbstractDataSource.testConnectionInternal (cyclomatic 22) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1392 — DruidAbstractDataSource.testConnectionInternal 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.
  • DruidAbstractDataSource.testConnectionInternal (cyclomatic 22) hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1372 — DruidAbstractDataSource.testConnectionInternal 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 · DruidAbstractDataSource.initPhysicalConnection (cyclomatic 18) · ×2
  • DruidAbstractDataSource.initPhysicalConnection (cyclomatic 18) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1744 — DruidAbstractDataSource.initPhysicalConnection has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • DruidAbstractDataSource.initPhysicalConnection (cyclomatic 18) hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1724 — DruidAbstractDataSource.initPhysicalConnection has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 18) · ×2
  • (anonymous) (cyclomatic 18) hoj-vue/src/common/api.js:80 — (anonymous) has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous) (cyclomatic 18) hoj-vue/src/router/index.js:40 — (anonymous) has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · encrypt (cyclomatic 18) · ×2
  • encrypt (cyclomatic 18) hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:565 — encrypt has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • encrypt (cyclomatic 18) hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:565 — encrypt has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · decrypt (cyclomatic 18) · ×2
  • decrypt (cyclomatic 18) hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:632 — decrypt has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • decrypt (cyclomatic 18) hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:632 — decrypt has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DruidAbstractDataSource.createPhysicalConnection (cyclomatic 17) · ×2
  • DruidAbstractDataSource.createPhysicalConnection (cyclomatic 17) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1593 — DruidAbstractDataSource.createPhysicalConnection has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • DruidAbstractDataSource.createPhysicalConnection (cyclomatic 17) hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1573 — DruidAbstractDataSource.createPhysicalConnection has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · decrypt (cognitive 53) · ×2
  • decrypt (cognitive 53) hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:632 — decrypt has cognitive complexity 53 (threshold 15). Drivers by points: loops 7 (26 pts), if/else 11 (22 pts), ternaries 1 (5 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • decrypt (cognitive 53) hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:632 — decrypt has cognitive complexity 53 (threshold 15). Drivers by points: loops 7 (26 pts), if/else 11 (22 pts), ternaries 1 (5 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · encrypt (cognitive 52) · ×2
  • encrypt (cognitive 52) hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:565 — encrypt has cognitive complexity 52 (threshold 15). Drivers by points: loops 7 (26 pts), if/else 11 (21 pts), ternaries 1 (5 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • encrypt (cognitive 52) hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:565 — encrypt has cognitive complexity 52 (threshold 15). Drivers by points: loops 7 (26 pts), if/else 11 (21 pts), ternaries 1 (5 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DruidAbstractDataSource.testConnectionInternal (cognitive 43) · ×2
  • DruidAbstractDataSource.testConnectionInternal (cognitive 43) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1392 — DruidAbstractDataSource.testConnectionInternal has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 3, error handling 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • DruidAbstractDataSource.testConnectionInternal (cognitive 43) hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1372 — DruidAbstractDataSource.testConnectionInternal has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 3, error handling 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DruidAbstractDataSource.initPhysicalConnection (cognitive 31) · ×2
  • DruidAbstractDataSource.initPhysicalConnection (cognitive 31) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1744 — DruidAbstractDataSource.initPhysicalConnection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (10 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DruidAbstractDataSource.initPhysicalConnection (cognitive 31) hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1724 — DruidAbstractDataSource.initPhysicalConnection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (10 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DruidAbstractDataSource.validateConnection (cognitive 27) · ×2
  • DruidAbstractDataSource.validateConnection (cognitive 27) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1320 — DruidAbstractDataSource.validateConnection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DruidAbstractDataSource.validateConnection (cognitive 27) hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1300 — DruidAbstractDataSource.validateConnection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · unpadBytesOut (cognitive 20) · ×2
  • unpadBytesOut (cognitive 20) hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:696 — unpadBytesOut has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • unpadBytesOut (cognitive 20) hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:696 — unpadBytesOut has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DruidAbstractDataSource.createPhysicalConnection (cognitive 19) · ×2
  • DruidAbstractDataSource.createPhysicalConnection (cognitive 19) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1593 — DruidAbstractDataSource.createPhysicalConnection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 3, boolean chains 2, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • DruidAbstractDataSource.createPhysicalConnection (cognitive 19) hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1573 — DruidAbstractDataSource.createPhysicalConnection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 3, boolean chains 2, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DruidAbstractDataSource.setConnectionInitSqls (cognitive 17) · ×2
  • DruidAbstractDataSource.setConnectionInitSqls (cognitive 17) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:690 — DruidAbstractDataSource.setConnectionInitSqls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • DruidAbstractDataSource.setConnectionInitSqls (cognitive 17) hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:670 — DruidAbstractDataSource.setConnectionInitSqls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IpUtils.getUserIpAddr (cognitive 17) · ×2
  • IpUtils.getUserIpAddr (cognitive 17) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/IpUtils.java:18 — IpUtils.getUserIpAddr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • IpUtils.getUserIpAddr (cognitive 17) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/IpUtils.java:16 — IpUtils.getUserIpAddr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:38 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:38-62 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:79-98 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java:27 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java:27-43 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/SwaggerConfig.java:27-43 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×2
  • Edited copy of a member (18 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:64 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:64-88 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:100-120 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:91 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:91-112 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionEntityServiceImpl.java:36-53 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (54 corresponding lines) · ×2
  • Edited copy of a member (54 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:188 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:188-241 | REDACTED:327-383 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (54 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:307 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:307-360 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:201-257 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×2
  • Edited copy of a member (36 corresponding lines) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:61 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:61-96 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:99-134 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:158 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:158-193 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:233-270 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×2
  • Edited copy of a member (29 corresponding lines) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java:46 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java:46-74 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java:77-119 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:68 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:68-96 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:122-150 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×2
  • Edited copy of a member (26 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeDispatcher.java:34 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeDispatcher.java:34-60 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeDispatcher.java:40-65 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:269 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:269-301 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:268-293 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×2
  • Edited copy of a member (22 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/RankManager.java:88 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/RankManager.java:88-109 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/RankManager.java:112-133 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:190 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:190-215 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:224-245 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java:40 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java:40-51 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java:54-65 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/NacosSwitchConfig.java:100 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/NacosSwitchConfig.java:100-112 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/NacosSwitchConfig.java:118-129 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 10+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java:38 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java:38-47 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestServiceImpl.java:34-43 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingServiceImpl.java:32-41 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestServiceImpl.java:76 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestServiceImpl.java:76-86 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestServiceImpl.java:89-98 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminProblemServiceImpl.java:38-47 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×2
  • Edited copy of a member (10 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingServiceImpl.java:76 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingServiceImpl.java:76-85 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestAdminServiceImpl.java:60-69 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java:66 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java:66-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminProblemServiceImpl.java:70-79 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 9+ corresponding lines) · ×2
  • Edited copies of one member (7 members, 9+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java:34 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java:34-42 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestScoreboardServiceImpl.java:29-37 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java:38-46 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/JudgeServiceImpl.java:63-71 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/JudgeServiceImpl.java:74-82 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/JudgeServiceImpl.java:143-151 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ProblemServiceImpl.java:59-67 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
  • Edited copies of one member (7 members, 9+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java:29 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java:29-37 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java:53-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImportHydroProblemServiceImpl.java:25-34 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImportQDUOJProblemServiceImpl.java:25-34 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ProblemFileServiceImpl.java:28-37 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/AccountServiceImpl.java:52-60 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/AccountServiceImpl.java:73-81 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 4+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:779 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:779-782 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java:177-180 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java:243-246 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java:32 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java:32-35 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminProblemServiceImpl.java:32-35 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingProblemServiceImpl.java:26-29 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (73 lines × 2) · ×2
  • Duplicated block (73 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1745 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1745-1817 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1725-1797 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (73 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1822 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1822-1894 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1802-1874 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (35 lines × 2) · ×2
  • Duplicated block (35 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/IpUtils.java:19 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/IpUtils.java:19-53 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/IpUtils.java:17-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (35 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:207 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:207-241 | REDACTED:349-383 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:207` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (29–30 lines × 2) · ×2
  • Duplicated block (29–30 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:82 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:82-110 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:127-156 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:82` 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 (29–30 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:179 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:179-208 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:268-296 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:179` 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:267` calls `setGid` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java: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 (26 lines × 2) · ×2
  • Duplicated block (26 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1685 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1685-1710 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1665-1690 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:58 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:58-83 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java:101-126 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1717 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1717-1738 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1697-1718 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (22 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java:1 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java:1-29 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java:1-22 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java:1` it does not close everything it opens, so those 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 (21 lines × 3) · ×2
  • Duplicated block (21 lines × 3) REDACTED:88 — REDACTED:88-108 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:127-147 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:198-218 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `REDACTED:88` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 3) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:66 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:66-86 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:117-137 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java:78-98 — before extracting anything, compare `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:66` it begins part-way through the construct above it, so those 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, `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java:100` calls `isEmpty`, `getStderr` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:95` 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 lines × 2) · ×2
  • Duplicated block (21 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1245 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1245-1265 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1225-1245 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:308 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:308-328 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java:202-222 — 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 (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:602 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:602-621 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java:144-163 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:602` it does not close everything it opens, so those 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: `Constants` names `top.hcode.hoj.util.Constants` in one and `top.hcode.hoj.utils.Constants` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (20 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:139 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:139-158 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:423-442 — both copies are in the same file, so extract the 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 (15–17 lines × 2) · ×2
  • Duplicated block (15–17 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:250 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:250-266 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:294-308 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:250` 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–17 lines × 2) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:352 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:352-366 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:550-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.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/JudgeServiceImpl.java:56 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/JudgeServiceImpl.java:56-72 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/JudgeServiceImpl.java:126-141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/JudgeServiceImpl.java:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16–17 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:225 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:225-241 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:263-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:225` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 4) · ×2
  • Duplicated block (14–15 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:108 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:108-122 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:162-175 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:200-213 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:242-256 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:108` 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:159` calls `setVariable` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:105` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14–15 lines × 4) REDACTED:101 — REDACTED:101-115 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:140-154 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:211-224 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java: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 all 4 call sites, so a change lands once. 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 — 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 × 3) · ×2
  • Duplicated block (12 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:179 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:179-190 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:241-252 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:298-309 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:179` 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:295` calls `setIndex`, `setSize` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:177` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:48 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:48-59 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:65-76 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:74-85 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (9–11 lines × 3) · ×2
  • Duplicated block (9–11 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:81 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:81-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:135-143 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:302-312 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9–11 lines × 3) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:278 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:278-286 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:381-391 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:475-485 — 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 `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:278` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:73 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:73-81 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:650-659 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9–10 lines × 2) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java:61 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java:61-69 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java:92-101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java: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.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×2
  • Duplicated block (7–10 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:154 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:154-163 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:263-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:154` it does not close everything it opens, so those exact lines 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–10 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:273 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:273-279 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:531-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. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java: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.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java:61 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java:61-67 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java:136-142 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java:178-185 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:56-62 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java: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.
  • Duplicated block (7 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:143 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:143-150 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:178-184 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:158-164 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:198-204 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×2
  • Duplicated block (6–7 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:581 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:581-587 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java:136-141 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:581` it begins part-way through the construct above it, so those 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: `Constants` names `top.hcode.hoj.util.Constants` in one and `top.hcode.hoj.utils.Constants` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6–7 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:372 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:372-377 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:423-429 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:372` it does not close everything it opens, so those 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 × 4) · ×2
  • Duplicated block (5 lines × 4) REDACTED:182 — REDACTED:182-186 | REDACTED:190-194 | REDACTED:198-202 | REDACTED:207-211 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:39 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:39-43 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:126-130 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:54-58 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:137-141 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:158 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:158-165 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:267-271 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:420-425 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:167` calls `StatusFailException` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:427` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:95 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:95-99 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:144-148 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:149-153 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java` as WHOLE FILES: this scan already matched 9 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
R10 · Code Duplication · Duplicated block (32 lines × 2 locations) · ×2
  • Duplicated block (32 lines × 2 locations) hoj-vue/src/components/oj/common/Announcements.vue:126 — hoj-vue/src/components/oj/common/Announcements.vue:126 · hoj-vue/src/components/oj/group/Announcement.vue:106 — 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.
  • Duplicated block (32 lines × 2 locations) hoj-vue/src/components/oj/group/Contest.vue:756 — hoj-vue/src/components/oj/group/Contest.vue:756 · hoj-vue/src/views/admin/contest/Contest.vue:739 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (26 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (26 matched lines × 2 locations) hoj-vue/src/components/oj/group/ProblemList.vue:254 — hoj-vue/src/components/oj/group/ProblemList.vue:254 · hoj-vue/src/views/oj/group/children/GroupProblemList.vue:225 — the two spans are one implementation copied and then locally edited — 124 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (26 matched lines × 2 locations) hoj-vue/src/store/contest.js:188 — hoj-vue/src/store/contest.js:188 · hoj-vue/src/store/group.js:41 — the two spans are one implementation copied and then locally edited — 148 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 (24 lines × 2 locations) · ×2
  • Duplicated block (24 lines × 2 locations) hoj-vue/src/components/oj/setting/Account.vue:319 — hoj-vue/src/components/oj/setting/Account.vue:319 · hoj-vue/src/components/oj/setting/Account.vue:397 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (24 lines × 2 locations) hoj-vue/src/views/admin/discussion/Discussion.vue:393 — hoj-vue/src/views/admin/discussion/Discussion.vue:393 · hoj-vue/src/views/admin/general/User.vue:767 — 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 (23 lines × 2 locations) · ×2
  • Duplicated block (23 lines × 2 locations) hoj-vue/src/components/oj/common/Register.vue:95 — hoj-vue/src/components/oj/common/Register.vue:95 · hoj-vue/src/views/oj/user/SetNewPassword.vue: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.
  • Duplicated block (23 lines × 2 locations) hoj-vue/src/components/oj/setting/Account.vue:349 — hoj-vue/src/components/oj/setting/Account.vue:349 · hoj-vue/src/components/oj/setting/Account.vue:425 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function decrypt (cyclomatic 18, cognitive 53) · ×2
  • Complex function decrypt (cyclomatic 18, cognitive 53) hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:632 — decrypt has cyclomatic complexity 18 and cognitive complexity 53; 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 decrypt (cyclomatic 18, cognitive 53) hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:632 — decrypt has cyclomatic complexity 18 and cognitive complexity 53; 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 encrypt (cyclomatic 18, cognitive 52) · ×2
  • Complex function encrypt (cyclomatic 18, cognitive 52) hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:565 — encrypt has cyclomatic complexity 18 and cognitive complexity 52; 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 encrypt (cyclomatic 18, cognitive 52) hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:565 — encrypt has cyclomatic complexity 18 and cognitive complexity 52; 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.
AC3 · Page structure · Data table has no header cells · ×1
  • Data table has no header cells hoj-vue/src/views/oj/problem/Problem.vue:52 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×1
  • Modal dialog does not manage focus hoj-scrollBoard/index.html:28 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
D1 · Cyclomatic Complexity · ProblemEntityServiceImpl.adminUpdateProblem (cyclomatic 49) · ×1
  • ProblemEntityServiceImpl.adminUpdateProblem (cyclomatic 49) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:112 — ProblemEntityServiceImpl.adminUpdateProblem has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StartupRunner.initSwitchConfig (cyclomatic 39) · ×1
  • StartupRunner.initSwitchConfig (cyclomatic 39) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:249 — StartupRunner.initSwitchConfig has cyclomatic complexity 39 (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 · ProblemFileManager.importProblem (cyclomatic 35) · ×1
  • ProblemFileManager.importProblem (cyclomatic 35) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:65 — ProblemFileManager.importProblem has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeForcesJudge.getLanguage (cyclomatic 31) · ×1
  • CodeForcesJudge.getLanguage (cyclomatic 31) REDACTED:451 — CodeForcesJudge.getLanguage has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ConfigManager.setSwitchConfig (cyclomatic 29) · ×1
  • ConfigManager.setSwitchConfig (cyclomatic 29) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java:337 — ConfigManager.setSwitchConfig has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ImportQDUOJProblemManager.importQDOJProblem (cyclomatic 29) · ×1
  • ImportQDUOJProblemManager.importQDOJProblem (cyclomatic 29) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:62 — ImportQDUOJProblemManager.importQDOJProblem has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GroupManager.addGroup (cyclomatic 28) · ×1
  • GroupManager.addGroup (cyclomatic 28) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:136 — GroupManager.addGroup has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ContestCalculateRankManager.calcACMRank (cyclomatic 27) · ×1
  • ContestCalculateRankManager.calcACMRank (cyclomatic 27) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:102 — ContestCalculateRankManager.calcACMRank has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImportFpsProblemManager.parseFps (cyclomatic 26) · ×1
  • ImportFpsProblemManager.parseFps (cyclomatic 26) REDACTED:117 — ImportFpsProblemManager.parseFps 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 · ProblemEntityServiceImpl.adminAddProblem (cyclomatic 25) · ×1
  • ProblemEntityServiceImpl.adminAddProblem (cyclomatic 25) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:394 — ProblemEntityServiceImpl.adminAddProblem 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 · ContestCalculateRankManager.calcOIRank (cyclomatic 25) · ×1
  • ContestCalculateRankManager.calcOIRank (cyclomatic 25) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:395 — ContestCalculateRankManager.calcOIRank 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 · scrollboard.Board.showInitBoard (cyclomatic 25) · ×1
  • scrollboard.Board.showInitBoard (cyclomatic 25) hoj-scrollBoard/js/scrollboard.js:1071 — scrollboard.Board.showInitBoard 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 · ImportHydroProblemManager.parseConfigYaml (cyclomatic 24) · ×1
  • ImportHydroProblemManager.parseConfigYaml (cyclomatic 24) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:240 — ImportHydroProblemManager.parseConfigYaml 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 · JudgeManager.getSubmission (cyclomatic 24) · ×1
  • JudgeManager.getSubmission (cyclomatic 24) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java:325 — JudgeManager.getSubmission 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 · ContestFileManager.downloadContestACSubmission (cyclomatic 23) · ×1
  • ContestFileManager.downloadContestACSubmission (cyclomatic 23) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:150 — ContestFileManager.downloadContestACSubmission has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProblemManager.getUserProblemStatus (cyclomatic 23) · ×1
  • ProblemManager.getUserProblemStatus (cyclomatic 23) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java:130 — ProblemManager.getUserProblemStatus has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JudgeValidator.validateTestJudgeInfo (cyclomatic 23) · ×1
  • JudgeValidator.validateTestJudgeInfo (cyclomatic 23) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/JudgeValidator.java:76 — JudgeValidator.validateTestJudgeInfo has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TestCaseManager.uploadTestcaseZip (cyclomatic 22) · ×1
  • TestCaseManager.uploadTestcaseZip (cyclomatic 22) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:53 — TestCaseManager.uploadTestcaseZip 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 · GroupManager.updateGroup (cyclomatic 22) · ×1
  • GroupManager.updateGroup (cyclomatic 22) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:227 — GroupManager.updateGroup has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JudgeManager.getALLCaseResult (cyclomatic 22) · ×1
  • JudgeManager.getALLCaseResult (cyclomatic 22) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java:597 — JudgeManager.getALLCaseResult 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 · LanguageStrategy.getLangContentType (cyclomatic 21) · ×1
  • LanguageStrategy.getLangContentType (cyclomatic 21) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/LanguageStrategy.java:43 — LanguageStrategy.getLangContentType has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AdminContestProblemManager.getProblemList (cyclomatic 21) · ×1
  • AdminContestProblemManager.getProblemList (cyclomatic 21) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:60 — AdminContestProblemManager.getProblemList has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · scrollboard.Board.updateTeamStatus (cyclomatic 21) · ×1
  • scrollboard.Board.updateTeamStatus (cyclomatic 21) hoj-scrollBoard/js/scrollboard.js:1270 — scrollboard.Board.updateTeamStatus has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 1334). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · CFProblemStrategy.getProblemInfo (cyclomatic 20) · ×1
  • CFProblemStrategy.getProblemInfo (cyclomatic 20) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:49 — CFProblemStrategy.getProblemInfo has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RejudgeManager.manualJudge (cyclomatic 20) · ×1
  • RejudgeManager.manualJudge (cyclomatic 20) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:210 — RejudgeManager.manualJudge has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ContestCalculateRankManager.getOIOrderRank (cyclomatic 20) · ×1
  • ContestCalculateRankManager.getOIOrderRank (cyclomatic 20) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:521 — ContestCalculateRankManager.getOIOrderRank has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AdminUserManager.editUser (cyclomatic 19) · ×1
  • AdminUserManager.editUser (cyclomatic 19) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/user/AdminUserManager.java:67 — AdminUserManager.editUser has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TestCaseManager.downloadTestcase (cyclomatic 19) · ×1
  • TestCaseManager.downloadTestcase (cyclomatic 19) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:167 — TestCaseManager.downloadTestcase 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 · CommentManager.addReply (cyclomatic 19) · ×1
  • CommentManager.addReply (cyclomatic 19) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:397 — CommentManager.addReply 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 · GroupDiscussionManager.addDiscussion (cyclomatic 18) · ×1
  • GroupDiscussionManager.addDiscussion (cyclomatic 18) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:133 — GroupDiscussionManager.addDiscussion has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GroupTrainingManager.updateTraining (cyclomatic 18) · ×1
  • GroupTrainingManager.updateTraining (cyclomatic 18) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:210 — GroupTrainingManager.updateTraining has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JudgeUtils.translateCommandline (cyclomatic 18) · ×1
  • JudgeUtils.translateCommandline (cyclomatic 18) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JudgeUtils.java:30 — JudgeUtils.translateCommandline has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · api.axios.interceptors.response.use() (cyclomatic 18) · ×1
  • api.axios.interceptors.response.use() (cyclomatic 18) hoj-vue/src/common/api.js:80 — api.axios.interceptors.response.use() has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.router.beforeEach() (cyclomatic 18) · ×1
  • index.router.beforeEach() (cyclomatic 18) hoj-vue/src/router/index.js:40 — index.router.beforeEach() has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AccountManager.changeEmail (cyclomatic 17) · ×1
  • AccountManager.changeEmail (cyclomatic 17) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:342 — AccountManager.changeEmail has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContestCalculateRankManager.getACMOrderRank (cyclomatic 17) · ×1
  • ContestCalculateRankManager.getACMOrderRank (cyclomatic 17) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:236 — ContestCalculateRankManager.getACMOrderRank has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TestJudge.checkResult (cyclomatic 17) · ×1
  • TestJudge.checkResult (cyclomatic 17) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java:47 — TestJudge.checkResult has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AdminUserManager.addNewUser (cyclomatic 16) · ×1
  • AdminUserManager.addNewUser (cyclomatic 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/user/AdminUserManager.java:195 — AdminUserManager.addNewUser has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImportHydroProblemManager.buildLanguageList (cyclomatic 16) · ×1
  • ImportHydroProblemManager.buildLanguageList (cyclomatic 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:427 — ImportHydroProblemManager.buildLanguageList has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ImportHydroProblemManager.importHydroProblem (cyclomatic 16) · ×1
  • ImportHydroProblemManager.importHydroProblem (cyclomatic 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:62 — ImportHydroProblemManager.importHydroProblem has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GroupMemberManager.addMember (cyclomatic 16) · ×1
  • GroupMemberManager.addMember (cyclomatic 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:90 — GroupMemberManager.addMember has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GroupMemberManager.updateMember (cyclomatic 16) · ×1
  • GroupMemberManager.updateMember (cyclomatic 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:147 — GroupMemberManager.updateMember has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GroupProblemManager.updateProblem (cyclomatic 16) · ×1
  • GroupProblemManager.updateProblem (cyclomatic 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:209 — GroupProblemManager.updateProblem has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CommentManager.addComment (cyclomatic 16) · ×1
  • CommentManager.addComment (cyclomatic 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:147 — CommentManager.addComment has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommentManager.deleteReply (cyclomatic 16) · ×1
  • CommentManager.deleteReply (cyclomatic 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:502 — CommentManager.deleteReply has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContestScoreboardManager.getContestOutsideScoreboard (cyclomatic 16) · ×1
  • ContestScoreboardManager.getContestOutsideScoreboard (cyclomatic 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScoreboardManager.java:76 — ContestScoreboardManager.getContestOutsideScoreboard has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TrainingManager.getTrainingRank (cyclomatic 16) · ×1
  • TrainingManager.getTrainingRank (cyclomatic 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:282 — TrainingManager.getTrainingRank has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InteractiveJudge.checkMultipleResult (cyclomatic 16) · ×1
  • InteractiveJudge.checkMultipleResult (cyclomatic 16) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:68 — InteractiveJudge.checkMultipleResult has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ProblemEntityServiceImpl.adminUpdateProblem (cognitive 81) · ×1
  • ProblemEntityServiceImpl.adminUpdateProblem (cognitive 81) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:112 — ProblemEntityServiceImpl.adminUpdateProblem has cognitive complexity 81 (threshold 15). Drivers by points: if/else 38 (64 pts), boolean chains 9, loops 7 (8 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProblemFileManager.importProblem (cognitive 68) · ×1
  • ProblemFileManager.importProblem (cognitive 68) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:65 — ProblemFileManager.importProblem has cognitive complexity 68 (threshold 15). Drivers by points: if/else 21 (42 pts), loops 10 (15 pts), error handling 4 (9 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scrollboard.Board.showInitBoard (cognitive 61) · ×1
  • scrollboard.Board.showInitBoard (cognitive 61) hoj-scrollBoard/js/scrollboard.js:1071 — scrollboard.Board.showInitBoard has cognitive complexity 61 (threshold 15). Drivers by points: if/else 19 (44 pts), loops 6 (9 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ImportQDUOJProblemManager.importQDOJProblem (cognitive 59) · ×1
  • ImportQDUOJProblemManager.importQDOJProblem (cognitive 59) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:62 — ImportQDUOJProblemManager.importQDOJProblem has cognitive complexity 59 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 9 (14 pts), error handling 4 (9 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContestCalculateRankManager.calcACMRank (cognitive 57) · ×1
  • ContestCalculateRankManager.calcACMRank (cognitive 57) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:102 — ContestCalculateRankManager.calcACMRank has cognitive complexity 57 (threshold 15). Drivers by points: if/else 27 (50 pts), boolean chains 6, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImportHydroProblemManager.parseConfigYaml (cognitive 55) · ×1
  • ImportHydroProblemManager.parseConfigYaml (cognitive 55) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:240 — ImportHydroProblemManager.parseConfigYaml has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (38 pts), loops 5 (16 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.router.beforeEach() (cognitive 54) · ×1
  • index.router.beforeEach() (cognitive 54) hoj-vue/src/router/index.js:40 — index.router.beforeEach() has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21 (50 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · (anonymous) (cognitive 54) · ×1
  • (anonymous) (cognitive 54) hoj-vue/src/router/index.js:40 — (anonymous) has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21 (50 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ContestCalculateRankManager.calcOIRank (cognitive 52) · ×1
  • ContestCalculateRankManager.calcOIRank (cognitive 52) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:395 — ContestCalculateRankManager.calcOIRank has cognitive complexity 52 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 6, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContestCalculateRankManager.getOIOrderRank (cognitive 52) · ×1
  • ContestCalculateRankManager.getOIOrderRank (cognitive 52) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:521 — ContestCalculateRankManager.getOIOrderRank has cognitive complexity 52 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 3 (5 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ProblemEntityServiceImpl.adminAddProblem (cognitive 47) · ×1
  • ProblemEntityServiceImpl.adminAddProblem (cognitive 47) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:394 — ProblemEntityServiceImpl.adminAddProblem has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (35 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImportFpsProblemManager.parseFps (cognitive 47) · ×1
  • ImportFpsProblemManager.parseFps (cognitive 47) REDACTED:117 — ImportFpsProblemManager.parseFps has cognitive complexity 47 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 10 (19 pts), boolean chains 3, error handling 3, ternaries 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContestFileManager.downloadContestACSubmission (cognitive 46) · ×1
  • ContestFileManager.downloadContestACSubmission (cognitive 46) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:150 — ContestFileManager.downloadContestACSubmission has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 6 (13 pts), error handling 3 (4 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JudgeManager.getSubmission (cognitive 46) · ×1
  • JudgeManager.getSubmission (cognitive 46) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java:325 — JudgeManager.getSubmission has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 8, error handling 2 (6 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · scrollboard.Board.updateTeamStatus (cognitive 46) · ×1
  • scrollboard.Board.updateTeamStatus (cognitive 46) hoj-scrollBoard/js/scrollboard.js:1270 — scrollboard.Board.updateTeamStatus has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 5 (7 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 22). Of this number, 22 points are the body's own statements and 24 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 · api.axios.interceptors.response.use() (cognitive 46) · ×1
  • api.axios.interceptors.response.use() (cognitive 46) hoj-vue/src/common/api.js:80 — api.axios.interceptors.response.use() has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (43 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 27). Of this number, 43 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · (anonymous) (cognitive 46) · ×1
  • (anonymous) (cognitive 46) hoj-vue/src/common/api.js:80 — (anonymous) has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (43 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 27). Of this number, 43 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · JudgeUtils.translateCommandline (cognitive 45) · ×1
  • JudgeUtils.translateCommandline (cognitive 45) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JudgeUtils.java:30 — JudgeUtils.translateCommandline has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JudgeManager.buildSubTaskDetail (cognitive 43) · ×1
  • JudgeManager.buildSubTaskDetail (cognitive 43) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java:682 — JudgeManager.buildSubTaskDetail has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 4 (10 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProblemManager.getUserProblemStatus (cognitive 42) · ×1
  • ProblemManager.getUserProblemStatus (cognitive 42) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java:130 — ProblemManager.getUserProblemStatus has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (37 pts), boolean chains 3, loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JudgeStrategy.computeResultInfo (cognitive 40) · ×1
  • JudgeStrategy.computeResultInfo (cognitive 40) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:287 — JudgeStrategy.computeResultInfo has cognitive complexity 40 (threshold 15). Drivers by points: loops 5 (20 pts), if/else 9 (18 pts), boolean chains 2 (nesting depth added 24). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · StartupRunner.initSwitchConfig (cognitive 38) · ×1
  • StartupRunner.initSwitchConfig (cognitive 38) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:249 — StartupRunner.initSwitchConfig has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 24, if/else 14. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · JudgeManager.getALLCaseResult (cognitive 36) · ×1
  • JudgeManager.getALLCaseResult (cognitive 36) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java:597 — JudgeManager.getALLCaseResult has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContestCalculateRankManager.getACMOrderRank (cognitive 35) · ×1
  • ContestCalculateRankManager.getACMOrderRank (cognitive 35) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:236 — ContestCalculateRankManager.getACMOrderRank has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 3, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileEntityEntityServiceImpl.changeACMContestRankToExcelRowList (cognitive 33) · ×1
  • FileEntityEntityServiceImpl.changeACMContestRankToExcelRowList (cognitive 33) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/FileEntityEntityServiceImpl.java:93 — FileEntityEntityServiceImpl.changeACMContestRankToExcelRowList has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GroupManager.addGroup (cognitive 33) · ×1
  • GroupManager.addGroup (cognitive 33) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:136 — GroupManager.addGroup has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 12 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UserMessageManager.getUserReplyMsgList (cognitive 33) · ×1
  • UserMessageManager.getUserReplyMsgList (cognitive 33) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:184 — UserMessageManager.getUserReplyMsgList has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeForcesJudge.getLanguage (cognitive 31) · ×1
  • CodeForcesJudge.getLanguage (cognitive 31) REDACTED:451 — CodeForcesJudge.getLanguage has cognitive complexity 31 (threshold 15). Drivers by points: if/else 31. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ConfigManager.setSwitchConfig (cognitive 30) · ×1
  • ConfigManager.setSwitchConfig (cognitive 30) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java:337 — ConfigManager.setSwitchConfig has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23 (24 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CommentManager.addComment (cognitive 30) · ×1
  • CommentManager.addComment (cognitive 30) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:147 — CommentManager.addComment has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentManager.addReply (cognitive 30) · ×1
  • CommentManager.addReply (cognitive 30) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:397 — CommentManager.addReply has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 6 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TestJudge.checkResult (cognitive 30) · ×1
  • TestJudge.checkResult (cognitive 30) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java:47 — TestJudge.checkResult has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StartupRunner.checkRemoteOJLanguage (cognitive 29) · ×1
  • StartupRunner.checkRemoteOJLanguage (cognitive 29) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:536 — StartupRunner.checkRemoteOJLanguage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (12 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TestCaseManager.uploadTestcaseZip (cognitive 28) · ×1
  • TestCaseManager.uploadTestcaseZip (cognitive 28) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:53 — TestCaseManager.uploadTestcaseZip has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrainingManager.getTrainingRank (cognitive 28) · ×1
  • TrainingManager.getTrainingRank (cognitive 28) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:282 — TrainingManager.getTrainingRank has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImportHydroProblemManager.importHydroProblem (cognitive 27) · ×1
  • ImportHydroProblemManager.importHydroProblem (cognitive 27) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:62 — ImportHydroProblemManager.importHydroProblem has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 3 (7 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscussionManager.addDiscussionLike (cognitive 27) · ×1
  • DiscussionManager.addDiscussionLike (cognitive 27) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:348 — DiscussionManager.addDiscussionLike has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RemoteProblemManager.adminAddOtherOJProblem (cognitive 26) · ×1
  • RemoteProblemManager.adminAddOtherOJProblem (cognitive 26) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/RemoteProblemManager.java:97 — RemoteProblemManager.adminAddOtherOJProblem has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RejudgeManager.manualJudge (cognitive 26) · ×1
  • RejudgeManager.manualJudge (cognitive 26) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:210 — RejudgeManager.manualJudge has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CodeForcesJudge.result (cognitive 26) · ×1
  • CodeForcesJudge.result (cognitive 26) REDACTED:221 — CodeForcesJudge.result has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scrollboard.Team.init (cognitive 26) · ×1
  • scrollboard.Team.init (cognitive 26) hoj-scrollBoard/js/scrollboard.js:831 — scrollboard.Team.init has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AdminContestProblemManager.getProblemList (cognitive 25) · ×1
  • AdminContestProblemManager.getProblemList (cognitive 25) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:60 — AdminContestProblemManager.getProblemList has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AccountManager.changeEmail (cognitive 25) · ×1
  • AccountManager.changeEmail (cognitive 25) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:342 — AccountManager.changeEmail has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentManager.deleteReply (cognitive 25) · ×1
  • CommentManager.deleteReply (cognitive 25) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:502 — CommentManager.deleteReply has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LanguageStrategy.getLangContentType (cognitive 24) · ×1
  • LanguageStrategy.getLangContentType (cognitive 24) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/LanguageStrategy.java:43 — LanguageStrategy.getLangContentType has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (20 pts), loops 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · TestCaseManager.downloadTestcase (cognitive 24) · ×1
  • TestCaseManager.downloadTestcase (cognitive 24) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:167 — TestCaseManager.downloadTestcase has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, error handling 3 (4 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JudgeValidator.validateTestJudgeInfo (cognitive 24) · ×1
  • JudgeValidator.validateTestJudgeInfo (cognitive 24) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/JudgeValidator.java:76 — JudgeValidator.validateTestJudgeInfo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SpecialJudge.checkResult (cognitive 24) · ×1
  • SpecialJudge.checkResult (cognitive 24) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:56 — SpecialJudge.checkResult has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (24 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeForcesJudge.getCsrfToken (cognitive 24) · ×1
  • CodeForcesJudge.getCsrfToken (cognitive 24) REDACTED:327 — CodeForcesJudge.getCsrfToken has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (8 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 1.run (cognitive 24) · ×1
  • 1.run (cognitive 24) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeGetResult.java:53 — 1.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · time.formatSpecificDuration (cognitive 24) · ×1
  • time.formatSpecificDuration (cognitive 24) hoj-vue/src/common/time.js:20 — time.formatSpecificDuration has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GYMProblemStrategy.getCsrfToken (cognitive 22) · ×1
  • GYMProblemStrategy.getCsrfToken (cognitive 22) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:188 — GYMProblemStrategy.getCsrfToken has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (8 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GroupDiscussionManager.addDiscussion (cognitive 22) · ×1
  • GroupDiscussionManager.addDiscussion (cognitive 22) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:133 — GroupDiscussionManager.addDiscussion has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CommentManager.deleteComment (cognitive 22) · ×1
  • CommentManager.deleteComment (cognitive 22) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:251 — CommentManager.deleteComment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InteractiveJudge.checkMultipleResult (cognitive 22) · ×1
  • InteractiveJudge.checkMultipleResult (cognitive 22) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:68 — InteractiveJudge.checkMultipleResult has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CodeForcesJudge.getMaxRunId (cognitive 22) · ×1
  • CodeForcesJudge.getMaxRunId (cognitive 22) REDACTED:124 — CodeForcesJudge.getMaxRunId has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (10 pts), error handling 2 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AdminUserManager.editUser (cognitive 21) · ×1
  • AdminUserManager.editUser (cognitive 21) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/user/AdminUserManager.java:67 — AdminUserManager.editUser has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GroupTrainingManager.updateTraining (cognitive 21) · ×1
  • GroupTrainingManager.updateTraining (cognitive 21) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:210 — GroupTrainingManager.updateTraining has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GroupManager.updateGroup (cognitive 21) · ×1
  • GroupManager.updateGroup (cognitive 21) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:227 — GroupManager.updateGroup has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 10. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CommonManager.getProblemTagsAndClassification (cognitive 21) · ×1
  • CommonManager.getProblemTagsAndClassification (cognitive 21) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommonManager.java:93 — CommonManager.getProblemTagsAndClassification has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContestManager.getContestFullScreenProblemList (cognitive 21) · ×1
  • ContestManager.getContestFullScreenProblemList (cognitive 21) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:289 — ContestManager.getContestFullScreenProblemList has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContestValidator.validateContestAuth (cognitive 21) · ×1
  • ContestValidator.validateContestAuth (cognitive 21) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/ContestValidator.java:91 — ContestValidator.validateContestAuth has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InteractiveJudge.checkInteractiveRes (cognitive 21) · ×1
  • InteractiveJudge.checkInteractiveRes (cognitive 21) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:130 — InteractiveJudge.checkInteractiveRes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpecialJudge.spjRunAndCheckResult (cognitive 21) · ×1
  • SpecialJudge.spjRunAndCheckResult (cognitive 21) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:149 — SpecialJudge.spjRunAndCheckResult has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scrollboard.getRequestParams (cognitive 21) · ×1
  • scrollboard.getRequestParams (cognitive 21) hoj-scrollBoard/js/scrollboard.js:629 — scrollboard.getRequestParams has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CFProblemStrategy.getProblemInfo (cognitive 20) · ×1
  • CFProblemStrategy.getProblemInfo (cognitive 20) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:49 — CFProblemStrategy.getProblemInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ProblemEntityServiceImpl.calProblemTotalScore (cognitive 20) · ×1
  • ProblemEntityServiceImpl.calProblemTotalScore (cognitive 20) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:785 — ProblemEntityServiceImpl.calProblemTotalScore has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (10 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImportHydroProblemManager.parseMarkdown (cognitive 20) · ×1
  • ImportHydroProblemManager.parseMarkdown (cognitive 20) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:379 — ImportHydroProblemManager.parseMarkdown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentManager.getComments (cognitive 20) · ×1
  • CommentManager.getComments (cognitive 20) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:89 — CommentManager.getComments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (5 pts), boolean chains 3, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscussionManager.addDiscussion (cognitive 20) · ×1
  • DiscussionManager.addDiscussion (cognitive 20) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:192 — DiscussionManager.addDiscussion has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AdminUserManager.addNewUser (cognitive 19) · ×1
  • AdminUserManager.addNewUser (cognitive 19) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/user/AdminUserManager.java:195 — AdminUserManager.addNewUser has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImportFpsProblemManager.importFPSProblem (cognitive 19) · ×1
  • ImportFpsProblemManager.importFPSProblem (cognitive 19) REDACTED:74 — ImportFpsProblemManager.importFPSProblem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (6 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 1.call (cognitive 19) · ×1
  • 1.call (cognitive 19) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:311 — 1.call has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GroupProblemManager.updateProblem (cognitive 19) · ×1
  • GroupProblemManager.updateProblem (cognitive 19) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:209 — GroupProblemManager.updateProblem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ContestCalculateRankManager.getContestAwardConfigList (cognitive 19) · ×1
  • ContestCalculateRankManager.getContestAwardConfigList (cognitive 19) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:682 — ContestCalculateRankManager.getContestAwardConfigList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JudgeStrategy.getJudgeInfo (cognitive 19) · ×1
  • JudgeStrategy.getJudgeInfo (cognitive 19) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:352 — JudgeStrategy.getJudgeInfo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GroupMemberManager.addMember (cognitive 18) · ×1
  • GroupMemberManager.addMember (cognitive 18) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:90 — GroupMemberManager.addMember has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ContestManager.getContestSubmissionList (cognitive 18) · ×1
  • ContestManager.getContestSubmissionList (cognitive 18) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:464 — ContestManager.getContestSubmissionList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JwtFilter.isAccessAllowed (cognitive 18) · ×1
  • JwtFilter.isAccessAllowed (cognitive 18) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/JwtFilter.java:51 — JwtFilter.isAccessAllowed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContestRecordEntityServiceImpl.getACInfo (cognitive 17) · ×1
  • ContestRecordEntityServiceImpl.getACInfo (cognitive 17) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestRecordEntityServiceImpl.java:43 — ContestRecordEntityServiceImpl.getACInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContestRecordEntityServiceImpl.getOIContestRecord (cognitive 17) · ×1
  • ContestRecordEntityServiceImpl.getOIContestRecord (cognitive 17) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestRecordEntityServiceImpl.java:115 — ContestRecordEntityServiceImpl.getOIContestRecord has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GroupContestManager.updateContest (cognitive 17) · ×1
  • GroupContestManager.updateContest (cognitive 17) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:205 — GroupContestManager.updateContest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BeforeDispatchInitManager.initContestSubmission (cognitive 17) · ×1
  • BeforeDispatchInitManager.initContestSubmission (cognitive 17) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:123 — BeforeDispatchInitManager.initContestSubmission has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CommentManager.addCommentLike (cognitive 17) · ×1
  • CommentManager.addCommentLike (cognitive 17) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:320 — CommentManager.addCommentLike has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (17 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContestScoreboardManager.getContestOutsideScoreboard (cognitive 17) · ×1
  • ContestScoreboardManager.getContestOutsideScoreboard (cognitive 17) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScoreboardManager.java:76 — ContestScoreboardManager.getContestOutsideScoreboard has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ImportHydroProblemManager.buildLanguageList (cognitive 16) · ×1
  • ImportHydroProblemManager.buildLanguageList (cognitive 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:427 — ImportHydroProblemManager.buildLanguageList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GroupContestManager.getContest (cognitive 16) · ×1
  • GroupContestManager.getContest (cognitive 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:102 — GroupContestManager.getContest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 4, error handling 2 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ContestManager.getContestProblem (cognitive 16) · ×1
  • ContestManager.getContestProblem (cognitive 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:218 — ContestManager.getContestProblem has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscussionManager.getDiscussionList (cognitive 16) · ×1
  • DiscussionManager.getDiscussionList (cognitive 16) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:84 — DiscussionManager.getDiscussionList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · JudgeRun.subtaskJudgeAllCase (cognitive 16) · ×1
  • JudgeRun.subtaskJudgeAllCase (cognitive 16) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:253 — JudgeRun.subtaskJudgeAllCase has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D3 · God Classes · FunctionTooLong · ×1
  • FunctionTooLong: scrollboard.binb_sha512 hoj-scrollBoard/js/scrollboard.js:248 — FunctionTooLong — binb_sha512 runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (6 members, 18 shared lines) · ×1
  • Near-duplicate member family (6 members, 18 shared lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:111 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:111-154 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:298-330 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:332-367 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:58-84 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:120-155 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:227-288 — These 6 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 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 · Near-duplicate member family (4 members, 40 shared lines) · ×1
  • Near-duplicate member family (4 members, 40 shared lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:150 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:150-332 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:334-402 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:275-442 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:167-272 — These 4 members are variants of one another: a block of 40 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, 23 shared lines) · ×1
  • Near-duplicate member family (4 members, 23 shared lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:91 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:91-122 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:135-175 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:186-213 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:224-256 — These 4 members are variants of one another: a block of 23 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 (77 shared lines) · ×1
  • Near-duplicate member pair (77 shared lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:110 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:110-233 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:403-519 — These two members are variants of one another: 77 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 (43 shared lines) · ×1
  • Near-duplicate member pair (43 shared lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:52 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java:52-118 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java:85-153 — These two members are variants of one another: 43 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 (39 shared lines) · ×1
  • Near-duplicate member pair (39 shared lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:147 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:147-248 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:397-500 — These two members are variants of one another: 39 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 (25 shared lines) · ×1
  • Near-duplicate member pair (25 shared lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:251 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:251-317 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:502-570 — These two members are variants of one another: 25 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 (93 corresponding lines) · ×1
  • Edited copy of a member (93 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java:76 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java:76-169 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java:177-270 — These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (38 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (38 members, 50+ identical tokens) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java:50 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java:50-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java:64-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java:78-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestAnnouncementServiceImpl.java:39-50 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestAnnouncementServiceImpl.java:53-64 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestAnnouncementServiceImpl.java:67-78 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:42-52 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:55-65 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:68-79 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:82-93 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:96-107 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:110-121 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java:51-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java:64-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java:78-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java:92-103 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java:106-117 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/impl/GroupDiscussionServiceImpl.java:50-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/impl/GroupDiscussionServiceImpl.java:64-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/impl/GroupDiscussionServiceImpl.java:78-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:56-66 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:69-80 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:83-94 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:97-108 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:111-121 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:135-146 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:149-160 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:163-174 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:177-188 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java:40-51 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java:54-65 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java:68-79 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java:82-93 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java:51-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java:64-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java:78-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java:92-103 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java:106-117 — These 38 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 38 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 38 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java:35 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java:35-44 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:112-123 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/discussion/AdminDiscussionManager.java:40-48 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java:57-65 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java:101-109 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingCategoryManager.java:51-60 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:111-124 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/user/AdminUserManager.java:152-160 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:123 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:123-197 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java:44-72 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java:75-98 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java:100-129 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java:132-151 — 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 · Edited copy of a member (72 corresponding lines) · ×1
  • Edited copy of a member (72 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:133 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:133-211 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:192-263 — These two members are one piece of code written twice and then edited apart: 72 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (67 corresponding lines) · ×1
  • Edited copy of a member (67 corresponding lines) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:321 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:321-391 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:419-485 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:98 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:98-156 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:152-207 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×1
  • Edited copy of a member (58 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:272 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:272-329 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:158-224 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:213 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:213-266 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:266-308 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java:124 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java:124-172 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:38-90 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×1
  • Edited copy of a member (47 corresponding lines) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:130 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:130-176 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:191-241 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:140 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:140-190 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:254-309 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:147 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:147-204 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:206-257 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (46 corresponding lines) · ×1
  • Edited copy of a member (46 corresponding lines) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:130 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:130-175 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:156-219 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:85 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:85-130 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:195-231 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java:96 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java:96-130 | REDACTED:98-136 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 33+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 33+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:117 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:117-156 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:158-190 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:132-170 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:172-210 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupTrainingEntityServiceImpl.java:37 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupTrainingEntityServiceImpl.java:37-63 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingEntityServiceImpl.java:42-69 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 31+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 31+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:156 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:156-186 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:217-248 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:270-305 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:378 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:378-405 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java:465-494 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:60 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:60-97 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:99-131 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 35+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 35+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:289 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:289-324 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:326-360 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:433-470 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:472-508 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:281 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:281-312 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:259-289 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java:55 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java:55-95 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java:100-142 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 20+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:43 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:43-62 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:64-83 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:60-79 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:81-100 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:69-88 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:90-109 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:117 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:117-141 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/ReplyEntityServiceImpl.java:69-99 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 17+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:51 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:51-67 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminGroupProblemManager.java:25-43 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:58-77 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/AtCoderJudge.java:149 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/AtCoderJudge.java:149-166 | REDACTED:148-164 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/SPOJJudge.java:146-159 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:27 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:27-45 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java:26-44 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:210 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:210-227 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:210-224 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java:32 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java:32-48 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java:78-92 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingCategoryManager.java:27-42 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:50 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:50-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:64-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java:49-60 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/JudgeServiceImpl.java:35 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/JudgeServiceImpl.java:35-47 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/JudgeServiceImpl.java:50-60 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:397 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:397-412 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java:30-45 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java:71-86 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 10+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:84 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:84-93 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:96-106 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java:109-119 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:92-106 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) REDACTED:517 — REDACTED:517-525 | REDACTED:217-225 | REDACTED:220-228 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 9+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java:41 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java:41-49 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java:52-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java:74-82 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java:85-93 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java:96-105 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java:27 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java:27-33 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestAnnouncementManager.java:28-33 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:136-140 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingProblemEntityServiceImpl.java:47 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingProblemEntityServiceImpl.java:47-50 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:412-415 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×1
  • Edited copy of a member (3 corresponding lines) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:455 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:455-457 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:435-437 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 8+ corresponding lines) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java:107 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java:107-114 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingProblemServiceImpl.java:62-69 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/UserMessageServiceImpl.java:31-38 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java:64-71 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (105 lines × 2) · ×1
  • Duplicated block (105 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1393 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1393-1497 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1373-1477 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (87 lines × 2) · ×1
  • Duplicated block (87 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1594 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1594-1680 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1574-1660 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (85 lines × 2) · ×1
  • Duplicated block (85 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:233 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:233-317 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:213-297 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (65 lines × 2) · ×1
  • Duplicated block (65 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1321 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1321-1385 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1301-1365 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (59 lines × 2) · ×1
  • Duplicated block (59 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1924 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1924-1982 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1904-1962 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (42–43 lines × 2) · ×1
  • Duplicated block (42–43 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:192 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:192-233 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:477-519 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:192` 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 (29 lines × 3) · ×1
  • Duplicated block (29 lines × 3) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:132 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:132-160 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:193-221 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:258-286 — 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 `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java:104 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java:104-130 | REDACTED:110-136 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java: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. 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 (24 lines × 4) · ×1
  • Duplicated block (24 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:303 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:303-326 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:377-400 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:414-437 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:243-266 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java` 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. If that is what happened, the fix is to keep one copy and have the 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:303` it begins part-way through the construct above it, so those 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:439` calls `del`, `getPath` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:401` 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) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:54 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:54-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:102-123 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:159-179 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:216-236 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:54` 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 (4–21 lines × 4) · ×1
  • Duplicated block (4–21 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:143 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:143-147 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:173-193 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:431-449 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:225-228 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–21 lines × 2) · ×1
  • Duplicated block (18–21 lines × 2) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:226 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:226-246 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:261-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:226` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16–21 lines × 2) · ×1
  • Duplicated block (16–21 lines × 2) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:448 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:448-468 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:594-609 — both copies are in the same file, so extract the 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 (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:71 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:71-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:71-90 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:74-93 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java` as WHOLE FILES: this scan already matched 9 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. If that is what happened, the fix is to keep one copy and have the 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 (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:154 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:154-172 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:215-233 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:268-286 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java:154` it does not close everything it opens, so those 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–19 lines × 2) · ×1
  • Duplicated block (13–19 lines × 2) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:78 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:78-96 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:129-141 — before extracting anything, compare `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:78` it begins part-way through the construct above it, so those 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–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:388 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:388-405 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java:479-494 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:388` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:378 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:378-394 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:420-436 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java:52-68 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java:93-109 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:378` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 4) · ×1
  • Duplicated block (16–17 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:285 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:285-301 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:359-375 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:397-412 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:226-241 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java` 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. If that is what happened, the fix is to keep one copy and have the 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:285` it does not close everything it opens, so those 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 × 4) · ×1
  • Duplicated block (14–17 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:78 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:78-93 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:78-94 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:81-97 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:79-92 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java` as WHOLE FILES: this scan already matched 9 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. If that is what happened, the fix is to keep one copy and have the 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:78` it begins part-way through the construct above it, so those 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:95` calls `list`, `eq` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java: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 (16–17 lines × 3) · ×1
  • Duplicated block (16–17 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:287 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:287-302 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:402-418 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:448-464 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:287` it begins part-way through the construct above it, so those 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 (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1170 — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1170-1186 | hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1150-1166 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` and `hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 929 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (15–16 lines × 3) · ×1
  • Duplicated block (15–16 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:91 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:91-106 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:138-152 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:196-210 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java: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 (14–15 lines × 9) · ×1
  • Duplicated block (14–15 lines × 9) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:52 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:52-66 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:173-187 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:103-117 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:270-284 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:304-318 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:69-83 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:159-173 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:234-247 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:333-346 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–15 lines × 5) · ×1
  • Duplicated block (14–15 lines × 5) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:123 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:123-137 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:290-304 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:327-341 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:434-448 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:473-486 — 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.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:160 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:160-172 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:217-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–14 lines × 14) · ×1
  • Duplicated block (12–14 lines × 14) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:137 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:137-150 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:172-184 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:65-77 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:106-118 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:152-164 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:116-128 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:228-240 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:283-295 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:317-329 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:172-183 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:210-223 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:246-258 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:294-306 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:345-357 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java: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 (10–13 lines × 14) · ×1
  • Duplicated block (10–13 lines × 14) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:56 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:56-68 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:97-109 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:144-155 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:177-189 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:107-119 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:219-231 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:274-286 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:308-320 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:73-85 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:163-174 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:202-213 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:238-249 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:287-296 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:337-348 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:95` calls `getCid` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:54` 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 (13 lines × 7) · ×1
  • Duplicated block (13 lines × 7) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:116 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:116-128 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:224-236 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:303-315 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:337-349 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:125-137 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:173-185 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:232-244 — there are 7 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 7 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (12–13 lines × 6) · ×1
  • Duplicated block (12–13 lines × 6) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:127 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:127-139 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:218-230 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:294-306 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:331-343 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:438-450 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:477-488 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:216` calls `getProblem`, `getId` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:125` 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 (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) REDACTED:83 — REDACTED:83-95 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:122-134 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:193-205 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:233-245 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:83` it does not close everything it opens, so those 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 × 4) · ×1
  • Duplicated block (11–12 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:65 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:65-76 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java:65-76 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:68-79 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:67-77 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java` as WHOLE FILES: this scan already matched 9 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. If that is what happened, the fix is to keep one copy and have the 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java: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.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:43 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:43-54 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:130-139 — both copies are in the same file, so extract the 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 lines × 6) · ×1
  • Duplicated block (11 lines × 6) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:112 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:112-122 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:299-309 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:333-343 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:60-70 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:121-131 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:228-238 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:125` calls `StatusForbiddenException` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:72` 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–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:194 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:194-203 | REDACTED:73-83 | REDACTED:336-345 — 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. Note first that the copies are not typed on the same thing: `CodeForcesUtils` names `top.hcode.hoj.util.CodeForcesUtils` in one and `top.hcode.hoj.utils.CodeForcesUtils` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, 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 (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:66 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:66-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java:81-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (3–11 lines × 3) · ×1
  • Duplicated block (3–11 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:286 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:286-296 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:447-457 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:550-552 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:286` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:548` calls `validateAccess`, `getById`, `getFromUid` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:286` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/JudgeValidator.java:62 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/JudgeValidator.java:62-74 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/JudgeValidator.java:139-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/JudgeValidator.java:62` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 3) · ×1
  • Duplicated block (8–10 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:41 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:41-50 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:128-135 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java:56-63 — 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 (2–10 lines × 5) · ×1
  • Duplicated block (2–10 lines × 5) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:136 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:136-137 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java:46-55 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java:83-86 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java:102-110 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java:134-141 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:136` it does not close everything it opens, so those 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:139` calls `getStatus`, `intValue`, `getCode` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java:143` 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 × 3) · ×1
  • Duplicated block (10 lines × 3) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:33 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:33-42 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:76-85 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:114-123 — 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 `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java:33` it does not close everything it opens, so those 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–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:132 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:132-141 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:196-203 — both copies are in the same file, so extract the 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 (8–9 lines × 19) · ×1
  • Duplicated block (8–9 lines × 19) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:78 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:78-85 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java:282-290 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:44-52 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:65-73 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:61-69 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:82-90 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:66-74 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:105-113 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:39-47 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:65-73 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:208-216 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:261-269 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:80-88 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:102-110 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:363-371 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:386-394 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:410-418 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:70-78 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:91-99 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (9 lines × 12) · ×1
  • Duplicated block (9 lines × 12) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:69 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:69-77 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:101-109 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:86-94 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:170-178 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:112-120 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:109-117 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:165-173 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:367-375 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:390-398 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:414-422 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:95-103 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:170-178 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:105` calls `getSubject`, `getPrincipal`, `hasRole` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:168` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 4) · ×1
  • Duplicated block (8–9 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:93 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:93-100 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:137-145 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:187-195 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:226-233 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java:93` it does not close everything it opens, so those 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) · ×1
  • Duplicated block (9 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:48 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:48-56 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:65-73 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:152-160 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:74-82 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 3) · ×1
  • Duplicated block (8–9 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:566 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:566-573 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java:52-59 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java:121-129 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 first that the copies are not typed on the same thing: `Constants` names `top.hcode.hoj.util.Constants` in one and `top.hcode.hoj.utils.Constants` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, 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 (10–15 lines × 4) · ×1
  • Duplicated block (10–15 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:617 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:617-631 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:701-715 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java:91-105 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java:159-168 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:617` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `Constants` names `top.hcode.hoj.util.Constants` in one and `top.hcode.hoj.utils.Constants` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, 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 (4–9 lines × 3) · ×1
  • Duplicated block (4–9 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:95 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:95-103 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:160-168 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:343-346 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:343` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:159` calls `getSubject`, `getPrincipal` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:92` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:100 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:100-108 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:154-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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:100` it does not close everything it opens, so those 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 × 38) · ×1
  • Duplicated block (8 lines × 38) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java:54 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java:54-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java:68-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java:82-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestAnnouncementServiceImpl.java:43-50 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestAnnouncementServiceImpl.java:57-64 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestAnnouncementServiceImpl.java:71-78 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:45-52 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:58-65 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:72-79 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:86-93 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:100-107 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:114-121 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java:54-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java:68-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java:82-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java:96-103 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java:110-117 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/impl/GroupDiscussionServiceImpl.java:54-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/impl/GroupDiscussionServiceImpl.java:68-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/impl/GroupDiscussionServiceImpl.java:82-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:59-66 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:73-80 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:87-94 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:101-108 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:114-121 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:139-146 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:153-160 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:167-174 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java:181-188 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java:44-51 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java:58-65 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java:72-79 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java:86-93 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java:54-61 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java:68-75 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java:82-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java:96-103 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java:110-117 — there are 38 copies across 8 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 38 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java:54` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 32) · ×1
  • Duplicated block (8 lines × 32) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:136 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:136-144 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:171-179 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:64-72 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:105-113 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:151-159 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:185-193 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:115-123 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:227-235 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:282-290 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java:316-324 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:81-89 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:171-178 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:209-217 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:245-253 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:293-300 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:344-352 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:135-143 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:161-169 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:226-234 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:302-310 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:339-347 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:446-454 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:484-491 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:124-132 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:166-174 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:232-240 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:311-319 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:345-353 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:99-107 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:133-141 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:181-189 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:240-248 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java:369 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java:369-375 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java:377-383 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java:385-392 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java:385` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) REDACTED:518 — REDACTED:518-525 | REDACTED:218-225 | REDACTED:221-228 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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.
D4 · Code Duplication · Duplicated block (4–8 lines × 3) · ×1
  • Duplicated block (4–8 lines × 3) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:228 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:228-235 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:309-316 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:330-333 — 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 `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:228` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:309` calls `set`, `getTestCaseInputFileName` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:330` 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 × 8) · ×1
  • Duplicated block (7 lines × 8) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java:37 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java:37-44 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:117-123 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/discussion/AdminDiscussionManager.java:42-48 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java:59-65 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java:103-109 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingCategoryManager.java:53-60 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java:117-124 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/user/AdminUserManager.java:154-160 — there are 8 copies across 7 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java:37` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 13) · ×1
  • Duplicated block (6 lines × 13) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:233 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:233-240 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:346-352 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:453-459 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:490-495 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:131-138 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:239-245 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:318-324 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:352-358 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:75-81 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:106-112 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:140-146 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:188-194 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java:247-253 — there are 13 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 13 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:233` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:242` calls `getProblem`, `setProblemId`, `getShortName` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:496` 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 (4–6 lines × 7) · ×1
  • Duplicated block (4–6 lines × 7) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:260 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:260-263 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:265-270 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:272-277 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:279-284 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:286-291 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:293-298 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:300-305 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java:260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:34 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:34-39 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:31-36 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java:42-47 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java:32-37 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (3–6 lines × 4) · ×1
  • Duplicated block (3–6 lines × 4) hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:50 — hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:50-57 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:78-80 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java:58-64 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java:48-53 — before extracting anything, compare `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java:57` calls `getTime`, `getMaxTime`, `set` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java:80` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×1
  • Duplicated block (5–6 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:41 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:41-46 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:286-290 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:128 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:128-132 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:328-330 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java:265-269 — 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java:270` calls `getIsRemote` and `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:134` 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 lines × 5) · ×1
  • Duplicated block (18 lines × 5) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusAccessDeniedException.java:10 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusAccessDeniedException.java:10-27 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusFailException.java:9-26 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusForbiddenException.java:10-27 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusNotFoundException.java:10-27 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusSystemErrorException.java:10-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 5 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (71 lines × 2) · ×1
  • Duplicated block (71 lines × 2) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java:1 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java:1-71 | hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/CommonResult.java:1-71 — before extracting anything, compare `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java` and `hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/CommonResult.java` 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 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 `hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java:1` it does not close everything it opens, so those 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 × 10) · ×1
  • Duplicated block (8 lines × 10) hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/impl/AdminAnnouncementServiceImpl.java:31 — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/impl/AdminAnnouncementServiceImpl.java:31-38 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/impl/AdminAnnouncementServiceImpl.java:41-48 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/impl/AdminAnnouncementServiceImpl.java:51-58 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestAnnouncementServiceImpl.java:32-39 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestAnnouncementServiceImpl.java:42-49 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestAnnouncementServiceImpl.java:52-59 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestServiceImpl.java:46-53 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminProblemServiceImpl.java:50-57 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/impl/ConfigServiceImpl.java:36-43 | hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingServiceImpl.java:44-51 — there are 10 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart.
D44 · Platform End-of-Life · End-of-life framework · ×1
  • End-of-life framework: Spring Boot 2 hoj-springboot/pom.xml:1 — hoj-springboot/pom.xml depends on `org.springframework.boot` at a version that pins Spring Boot 2, and Spring Boot 2.x, open-source support ended 2023-11-24. The constraint cannot admit a different major, so this repository stays on it until the declaration is edited. An end-of-life framework receives no further releases, including security releases.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: hoj-api — hoj-api: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 145 plain JS — the untyped files are hoj-scrollBoard/js/scrollboard.js, hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js, hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js, hoj-vue/src/App.vue, hoj-vue/src/common/api.js, hoj-vue/src/common/codeblock.js (+139 more).
R10 · Code Duplication · Duplication concentrated across 2 sibling directories (35 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (35 clone groups) hoj-vue/src/components/oj/group/Problem.vue:852 — 35 duplicated blocks under hoj-vue/src/ have copies in at least two of the sibling directories components, views — 27 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 35 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 35 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 35 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 8 sibling directories (23 clone groups) · ×1
  • Duplication concentrated across 8 sibling directories (23 clone groups) hoj-vue/src/views/oj/group/children/GroupProblemList.vue:253 — 23 duplicated blocks under hoj-vue/src/views/oj/ have copies in at least two of the sibling directories contest, discussion, group, problem, rank, status (+2 more sibling(s) not listed) — 12 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 23 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (9 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (9 clone groups) hoj-vue/src/views/admin/problem/ProblemList.vue:515 — 9 duplicated blocks under hoj-vue/src/views/admin/ have copies in at least two of the sibling directories contest, discussion, general, problem, training — 8 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Wholesale file copy (584 identical lines × 2 files) · ×1
  • Wholesale file copy (584 identical lines × 2 files) hoj-vue/src/components/oj/group/Problem.vue:852 — hoj-vue/src/components/oj/group/Problem.vue:852 · hoj-vue/src/views/admin/problem/Problem.vue:870 — these 2 files are line-for-line copies of one another — 584 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 (499 identical lines × 2 files) · ×1
  • Wholesale file copy (499 identical lines × 2 files) hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:1 — hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:1 · hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:1 — these 2 files are line-for-line copies of one another — 499 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 (155 lines × 2 locations) · ×1
  • Duplicated block (155 lines × 2 locations) hoj-vue/src/components/oj/group/Contest.vue:871 — hoj-vue/src/components/oj/group/Contest.vue:871 · hoj-vue/src/views/admin/contest/Contest.vue:856 — 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 · Wholesale file copy (106 identical lines × 2 files) · ×1
  • Wholesale file copy (106 identical lines × 2 files) hoj-vue/src/views/oj/rank/ACMRank.vue:127 — hoj-vue/src/views/oj/rank/ACMRank.vue:127 · hoj-vue/src/views/oj/rank/OIRank.vue:132 — these 2 files are line-for-line copies of one another — 106 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 (92 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (92 matched lines × 2 locations) hoj-vue/src/components/oj/group/AnnouncementList.vue:228 — hoj-vue/src/components/oj/group/AnnouncementList.vue:228 · hoj-vue/src/views/admin/general/Announcement.vue:251 — the two spans are one implementation copied and then locally edited — 523 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 (87 lines × 2 locations) · ×1
  • Duplicated block (87 lines × 2 locations) hoj-vue/src/components/oj/setting/UserInfo.vue:248 — hoj-vue/src/components/oj/setting/UserInfo.vue:248 · hoj-vue/src/views/oj/group/children/GroupSetting.vue:353 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (81 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (81 matched lines × 2 locations) hoj-vue/src/components/oj/group/Training.vue:126 — hoj-vue/src/components/oj/group/Training.vue:126 · hoj-vue/src/views/admin/training/Training.vue:105 — the two spans are one implementation copied and then locally edited — 441 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (77 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (77 matched lines × 2 locations) hoj-vue/src/views/admin/problem/ProblemList.vue:515 — hoj-vue/src/views/admin/problem/ProblemList.vue:515 · hoj-vue/src/views/admin/training/TrainingProblemList.vue:311 — the two spans are one implementation copied and then locally edited — 444 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (76 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (76 matched lines × 2 locations) hoj-vue/src/components/oj/group/TrainingProblemList.vue:210 — hoj-vue/src/components/oj/group/TrainingProblemList.vue:210 · hoj-vue/src/views/admin/training/TrainingProblemList.vue:311 — the two spans are one implementation copied and then locally edited — 435 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 (75 lines × 2 locations) · ×1
  • Duplicated block (75 lines × 2 locations) hoj-vue/src/views/oj/group/GroupList.vue:370 — hoj-vue/src/views/oj/group/GroupList.vue:370 · hoj-vue/src/views/oj/group/children/GroupSetting.vue:274 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block with local edits (73 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (73 matched lines × 2 locations) hoj-vue/src/store/contest.js:35 — hoj-vue/src/store/contest.js:35 · hoj-vue/src/store/training.js:19 — the two spans are one implementation copied and then locally edited — 490 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (72 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (72 matched lines × 2 locations) hoj-vue/src/views/admin/general/Announcement.vue:172 — hoj-vue/src/views/admin/general/Announcement.vue:172 · hoj-vue/src/views/admin/general/SysNotice.vue:162 — the two spans are one implementation copied and then locally edited — 392 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (69 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (69 matched lines × 2 locations) hoj-vue/src/views/oj/group/children/GroupContestList.vue:411 — hoj-vue/src/views/oj/group/children/GroupContestList.vue:411 · hoj-vue/src/views/oj/group/children/GroupTrainingList.vue:299 — the two spans are one implementation copied and then locally edited — 328 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (66 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (66 matched lines × 2 locations) hoj-vue/src/components/oj/group/ContestList.vue:221 — hoj-vue/src/components/oj/group/ContestList.vue:221 · hoj-vue/src/components/oj/group/TrainingList.vue:140 — the two spans are one implementation copied and then locally edited — 416 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (62 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (62 matched lines × 2 locations) hoj-vue/src/views/oj/contest/ContestDetails.vue:439 — hoj-vue/src/views/oj/contest/ContestDetails.vue:439 · hoj-vue/src/views/oj/contest/outside/scoreBoardMixin.js:73 — the two spans are one implementation copied and then locally edited — 291 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 · Wholesale file copy (57 identical lines × 2 files) · ×1
  • Wholesale file copy (57 identical lines × 2 files) hoj-vue/src/views/oj/message/SysMsg.vue:74 — hoj-vue/src/views/oj/message/SysMsg.vue:74 · hoj-vue/src/views/oj/message/UserMsg.vue:116 — these 2 files are line-for-line copies of one another — 57 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 (53 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (53 matched lines × 2 locations) hoj-vue/src/views/oj/group/children/GroupProblemList.vue:253 — hoj-vue/src/views/oj/group/children/GroupProblemList.vue:253 · hoj-vue/src/views/oj/training/TrainingProblemList.vue:152 — the two spans are one implementation copied and then locally edited — 306 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (50 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (50 matched lines × 2 locations) hoj-vue/src/views/admin/contest/ContestList.vue:226 — hoj-vue/src/views/admin/contest/ContestList.vue:226 · hoj-vue/src/views/admin/training/TrainingList.vue:156 — the two spans are one implementation copied and then locally edited — 275 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (48 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (48 matched lines × 2 locations) hoj-vue/src/components/admin/AddPublicProblem.vue:71 — hoj-vue/src/components/admin/AddPublicProblem.vue:71 · hoj-vue/src/components/oj/group/AddPublicProblem.vue:89 — the two spans are one implementation copied and then locally edited — 255 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (44 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (44 matched lines × 2 locations) hoj-vue/src/views/oj/contest/children/contestRankMixin.js:44 — hoj-vue/src/views/oj/contest/children/contestRankMixin.js:44 · hoj-vue/src/views/oj/contest/outside/scoreBoardMixin.js:82 — the two spans are one implementation copied and then locally edited — 240 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 (43 lines × 2 locations) · ×1
  • Duplicated block (43 lines × 2 locations) hoj-vue/src/views/oj/contest/children/ACMContestRank.vue:622 — hoj-vue/src/views/oj/contest/children/ACMContestRank.vue:622 · hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue:560 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (39 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (39 matched lines × 2 locations) hoj-vue/src/views/oj/contest/children/ACMInfoAdmin.vue:140 — hoj-vue/src/views/oj/contest/children/ACMInfoAdmin.vue:140 · hoj-vue/src/views/oj/contest/children/ContestAdminPrint.vue:106 — the two spans are one implementation copied and then locally edited — 163 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 (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) hoj-vue/src/views/oj/contest/children/OIContestRank.vue:592 — hoj-vue/src/views/oj/contest/children/OIContestRank.vue:592 · hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue:542 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (30 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (30 matched lines × 2 locations) hoj-vue/src/components/oj/group/AnnouncementList.vue:185 — hoj-vue/src/components/oj/group/AnnouncementList.vue:185 · hoj-vue/src/views/oj/group/children/GroupMemberList.vue:110 — the two spans are one implementation copied and then locally edited — 146 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 (28 lines × 2 locations) · ×1
  • Duplicated block (28 lines × 2 locations) hoj-vue/src/views/oj/user/UserHome.vue:279 — hoj-vue/src/views/oj/user/UserHome.vue:279 · hoj-vue/src/views/oj/user/UserHome.vue:373 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block (27 lines × 2 locations) · ×1
  • Duplicated block (27 lines × 2 locations) hoj-vue/src/components/oj/group/Contest.vue:813 — hoj-vue/src/components/oj/group/Contest.vue:813 · hoj-vue/src/views/admin/contest/Contest.vue:794 — 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 (22 lines × 2 locations) · ×1
  • Duplicated block (22 lines × 2 locations) hoj-vue/src/store/contest.js:270 — hoj-vue/src/store/contest.js:270 · hoj-vue/src/store/training.js:104 — 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 (22 lines × 3 locations) · ×1
  • Duplicated block (22 lines × 3 locations) hoj-vue/src/views/admin/problem/Tag.vue:284 — hoj-vue/src/views/admin/problem/Tag.vue:284 · hoj-vue/src/views/admin/problem/Tag.vue:321 · hoj-vue/src/views/admin/training/Category.vue:133 — the 3 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 (21 lines × 2 locations) · ×1
  • Duplicated block (21 lines × 2 locations) hoj-vue/src/components/oj/group/ProblemList.vue:403 — hoj-vue/src/components/oj/group/ProblemList.vue:403 · hoj-vue/src/components/oj/group/TrainingProblemList.vue:259 — 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.
R2 · Cyclomatic Complexity · Complex function submit (cyclomatic 65, cognitive 152) · ×1
  • Complex function submit (cyclomatic 65, cognitive 152) hoj-vue/src/views/admin/problem/Problem.vue:1511 — submit has cyclomatic complexity 65 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function submit (cyclomatic 65, cognitive 147) · ×1
  • Complex function submit (cyclomatic 65, cognitive 147) hoj-vue/src/components/oj/group/Problem.vue:1462 — submit has cyclomatic complexity 65 and cognitive complexity 147; 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 showInitBoard (cyclomatic 25, cognitive 60) · ×1
  • Complex function showInitBoard (cyclomatic 25, cognitive 60) hoj-scrollBoard/js/scrollboard.js:1071 — showInitBoard has cyclomatic complexity 25 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 18, cognitive 54) · ×1
  • Complex function (anonymous) (cyclomatic 18, cognitive 54) hoj-vue/src/router/index.js:40 — (anonymous) has cyclomatic complexity 18 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 17, cognitive 43) · ×1
  • Complex function (anonymous) (cyclomatic 17, cognitive 43) hoj-vue/src/common/api.js:80 — (anonymous) has cyclomatic complexity 17 and cognitive complexity 43; 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 cellClassName (cyclomatic 17, cognitive 15) · ×1
  • Complex function cellClassName (cyclomatic 17, cognitive 15) hoj-vue/src/views/oj/contest/children/ACMContestRank.vue:583 — cellClassName has cyclomatic complexity 17 and cognitive complexity 15; 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 saveContest (cyclomatic 16, cognitive 13) · ×1
  • Complex function saveContest (cyclomatic 16, cognitive 13) hoj-vue/src/views/admin/contest/Contest.vue:773 — saveContest has cyclomatic complexity 16 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 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 cellClassName (cyclomatic 15, cognitive 15) · ×1
  • Complex function cellClassName (cyclomatic 15, cognitive 15) hoj-vue/src/views/oj/contest/children/OIContestRank.vue:502 — cellClassName has cyclomatic complexity 15 and cognitive complexity 15; 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 submit (cyclomatic 15, cognitive 12) · ×1
  • Complex function submit (cyclomatic 15, cognitive 12) hoj-vue/src/components/oj/group/Contest.vue:792 — submit has cyclomatic complexity 15 and cognitive complexity 12; 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 init (cyclomatic 14, cognitive 26) · ×1
  • Complex function init (cyclomatic 14, cognitive 26) hoj-scrollBoard/js/scrollboard.js:831 — init has cyclomatic complexity 14 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 $route (cyclomatic 14, cognitive 10) · ×1
  • Complex function $route (cyclomatic 14, cognitive 10) hoj-vue/src/views/oj/group/GroupDetails.vue:540 — $route has cyclomatic complexity 14 and cognitive complexity 10; 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 submitDiscussion (cyclomatic 13, cognitive 14) · ×1
  • Complex function submitDiscussion (cyclomatic 13, cognitive 14) hoj-vue/src/views/oj/discussion/discussionList.vue:692 — submitDiscussion has cyclomatic complexity 13 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 12, cognitive 24) · ×1
  • Complex function (anonymous) (cyclomatic 12, cognitive 24) hoj-scrollBoard/js/scrollboard.js:1334 — (anonymous) has cyclomatic complexity 12 and cognitive complexity 24; 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 formatSpecificDuration (cyclomatic 12, cognitive 24) · ×1
  • Complex function formatSpecificDuration (cyclomatic 12, cognitive 24) hoj-vue/src/common/time.js:20 — formatSpecificDuration has cyclomatic complexity 12 and cognitive complexity 24; 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 autoChangeLanguge (cyclomatic 11, cognitive 13) · ×1
  • Complex function autoChangeLanguge (cyclomatic 11, cognitive 13) hoj-vue/src/App.vue:159 — autoChangeLanguge 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.
R2 · Cyclomatic Complexity · Complex function resizeWatchHeight (cyclomatic 11, cognitive 13) · ×1
  • Complex function resizeWatchHeight (cyclomatic 11, cognitive 13) hoj-vue/src/views/oj/problem/Problem.vue:1174 — resizeWatchHeight 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.
R2 · Cyclomatic Complexity · Complex function str2rstr_utf8 (cyclomatic 11, cognitive 11) · ×1
  • Complex function str2rstr_utf8 (cyclomatic 11, cognitive 11) hoj-scrollBoard/js/scrollboard.js:162 — str2rstr_utf8 has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 saveTraining (cyclomatic 11, cognitive 10) · ×1
  • Complex function saveTraining (cyclomatic 11, cognitive 10) hoj-vue/src/views/admin/training/Training.vue:171 — saveTraining has cyclomatic complexity 11 and cognitive complexity 10; 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.
R3 · Large Files · hoj-vue/src/views/oj/problem/Problem.vue · ×1
  • hoj-vue/src/views/oj/problem/Problem.vue: 2115 lines of code hoj-vue/src/views/oj/problem/Problem.vue:1 — hoj-vue/src/views/oj/problem/Problem.vue has 2115 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/admin/problem/Problem.vue · ×1
  • hoj-vue/src/views/admin/problem/Problem.vue: 1884 lines of code hoj-vue/src/views/admin/problem/Problem.vue:1 — hoj-vue/src/views/admin/problem/Problem.vue has 1884 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/components/oj/group/Problem.vue · ×1
  • hoj-vue/src/components/oj/group/Problem.vue: 1839 lines of code hoj-vue/src/components/oj/group/Problem.vue:1 — hoj-vue/src/components/oj/group/Problem.vue has 1839 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/common/api.js · ×1
  • hoj-vue/src/common/api.js: 1781 lines of code hoj-vue/src/common/api.js:1 — hoj-vue/src/common/api.js has 1781 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-scrollBoard/js/scrollboard.js · ×1
  • hoj-scrollBoard/js/scrollboard.js: 1306 lines of code hoj-scrollBoard/js/scrollboard.js:1 — hoj-scrollBoard/js/scrollboard.js has 1306 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/components/oj/comment/comment.vue · ×1
  • hoj-vue/src/components/oj/comment/comment.vue: 1261 lines of code hoj-vue/src/components/oj/comment/comment.vue:1 — hoj-vue/src/components/oj/comment/comment.vue has 1261 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/status/SubmissionList.vue · ×1
  • hoj-vue/src/views/oj/status/SubmissionList.vue: 1109 lines of code hoj-vue/src/views/oj/status/SubmissionList.vue:1 — hoj-vue/src/views/oj/status/SubmissionList.vue has 1109 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/components/oj/group/Contest.vue · ×1
  • hoj-vue/src/components/oj/group/Contest.vue: 1029 lines of code hoj-vue/src/components/oj/group/Contest.vue:1 — hoj-vue/src/components/oj/group/Contest.vue has 1029 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/components/oj/common/CodeMirror.vue · ×1
  • hoj-vue/src/components/oj/common/CodeMirror.vue: 1023 lines of code hoj-vue/src/components/oj/common/CodeMirror.vue:1 — hoj-vue/src/components/oj/common/CodeMirror.vue has 1023 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/admin/contest/Contest.vue · ×1
  • hoj-vue/src/views/admin/contest/Contest.vue: 1004 lines of code hoj-vue/src/views/admin/contest/Contest.vue:1 — hoj-vue/src/views/admin/contest/Contest.vue has 1004 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/components/oj/common/NavBar.vue · ×1
  • hoj-vue/src/components/oj/common/NavBar.vue: 959 lines of code hoj-vue/src/components/oj/common/NavBar.vue:1 — hoj-vue/src/components/oj/common/NavBar.vue has 959 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/discussion/discussionList.vue · ×1
  • hoj-vue/src/views/oj/discussion/discussionList.vue: 921 lines of code hoj-vue/src/views/oj/discussion/discussionList.vue:1 — hoj-vue/src/views/oj/discussion/discussionList.vue has 921 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/admin/general/User.vue · ×1
  • hoj-vue/src/views/admin/general/User.vue: 915 lines of code hoj-vue/src/views/admin/general/User.vue:1 — hoj-vue/src/views/admin/general/User.vue has 915 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/App.vue · ×1
  • hoj-vue/src/App.vue: 852 lines of code hoj-vue/src/App.vue:1 — hoj-vue/src/App.vue has 852 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/problem/ProblemList.vue · ×1
  • hoj-vue/src/views/oj/problem/ProblemList.vue: 836 lines of code hoj-vue/src/views/oj/problem/ProblemList.vue:1 — hoj-vue/src/views/oj/problem/ProblemList.vue has 836 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/contest/children/ACMContestRank.vue · ×1
  • hoj-vue/src/views/oj/contest/children/ACMContestRank.vue: 807 lines of code hoj-vue/src/views/oj/contest/children/ACMContestRank.vue:1 — hoj-vue/src/views/oj/contest/children/ACMContestRank.vue has 807 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 740 lines of code REDACTED:1 — REDACTED has 740 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/admin/Home.vue · ×1
  • hoj-vue/src/views/admin/Home.vue: 734 lines of code hoj-vue/src/views/admin/Home.vue:1 — hoj-vue/src/views/admin/Home.vue has 734 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue · ×1
  • hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue: 704 lines of code hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue:1 — hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue has 704 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/contest/children/OIContestRank.vue · ×1
  • hoj-vue/src/views/oj/contest/children/OIContestRank.vue: 692 lines of code hoj-vue/src/views/oj/contest/children/OIContestRank.vue:1 — hoj-vue/src/views/oj/contest/children/OIContestRank.vue has 692 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/group/GroupList.vue · ×1
  • hoj-vue/src/views/oj/group/GroupList.vue: 679 lines of code hoj-vue/src/views/oj/group/GroupList.vue:1 — hoj-vue/src/views/oj/group/GroupList.vue has 679 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js · ×1
  • hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js: 677 lines of code hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js:1 — hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js has 677 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js · ×1
  • hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js: 677 lines of code hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js:1 — hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js has 677 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue · ×1
  • hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue: 664 lines of code hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue:1 — hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue has 664 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/admin/problem/ProblemList.vue · ×1
  • hoj-vue/src/views/admin/problem/ProblemList.vue: 653 lines of code hoj-vue/src/views/admin/problem/ProblemList.vue:1 — hoj-vue/src/views/admin/problem/ProblemList.vue has 653 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/status/SubmissionDetails.vue · ×1
  • hoj-vue/src/views/oj/status/SubmissionDetails.vue: 622 lines of code hoj-vue/src/views/oj/status/SubmissionDetails.vue:1 — hoj-vue/src/views/oj/status/SubmissionDetails.vue has 622 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/group/GroupDetails.vue · ×1
  • hoj-vue/src/views/oj/group/GroupDetails.vue: 615 lines of code hoj-vue/src/views/oj/group/GroupDetails.vue:1 — hoj-vue/src/views/oj/group/GroupDetails.vue has 615 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/contest/ContestDetails.vue · ×1
  • hoj-vue/src/views/oj/contest/ContestDetails.vue: 607 lines of code hoj-vue/src/views/oj/contest/ContestDetails.vue:1 — hoj-vue/src/views/oj/contest/ContestDetails.vue has 607 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue · ×1
  • hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue: 598 lines of code hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue:1 — hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue has 598 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/group/children/GroupContestList.vue · ×1
  • hoj-vue/src/views/oj/group/children/GroupContestList.vue: 578 lines of code hoj-vue/src/views/oj/group/children/GroupContestList.vue:1 — hoj-vue/src/views/oj/group/children/GroupContestList.vue has 578 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/user/UserHome.vue · ×1
  • hoj-vue/src/views/oj/user/UserHome.vue: 574 lines of code hoj-vue/src/views/oj/user/UserHome.vue:1 — hoj-vue/src/views/oj/user/UserHome.vue has 574 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/group/children/GroupSetting.vue · ×1
  • hoj-vue/src/views/oj/group/children/GroupSetting.vue: 547 lines of code hoj-vue/src/views/oj/group/children/GroupSetting.vue:1 — hoj-vue/src/views/oj/group/children/GroupSetting.vue has 547 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/contest/ContestList.vue · ×1
  • hoj-vue/src/views/oj/contest/ContestList.vue: 501 lines of code hoj-vue/src/views/oj/contest/ContestList.vue:1 — hoj-vue/src/views/oj/contest/ContestList.vue has 501 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/components/oj/setting/Account.vue · ×1
  • hoj-vue/src/components/oj/setting/Account.vue: 485 lines of code hoj-vue/src/components/oj/setting/Account.vue:1 — hoj-vue/src/components/oj/setting/Account.vue has 485 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/admin/general/SystemConfig.vue · ×1
  • hoj-vue/src/views/admin/general/SystemConfig.vue: 465 lines of code hoj-vue/src/views/admin/general/SystemConfig.vue:1 — hoj-vue/src/views/admin/general/SystemConfig.vue has 465 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/components/oj/group/ProblemList.vue · ×1
  • hoj-vue/src/components/oj/group/ProblemList.vue: 457 lines of code hoj-vue/src/components/oj/group/ProblemList.vue:1 — hoj-vue/src/components/oj/group/ProblemList.vue has 457 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/training/TrainingRank.vue · ×1
  • hoj-vue/src/views/oj/training/TrainingRank.vue: 452 lines of code hoj-vue/src/views/oj/training/TrainingRank.vue:1 — hoj-vue/src/views/oj/training/TrainingRank.vue has 452 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/components/oj/setting/UserInfo.vue · ×1
  • hoj-vue/src/components/oj/setting/UserInfo.vue: 447 lines of code hoj-vue/src/components/oj/setting/UserInfo.vue:1 — hoj-vue/src/components/oj/setting/UserInfo.vue has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/oj/discussion/discussion.vue · ×1
  • hoj-vue/src/views/oj/discussion/discussion.vue: 447 lines of code hoj-vue/src/views/oj/discussion/discussion.vue:1 — hoj-vue/src/views/oj/discussion/discussion.vue has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · hoj-vue/src/views/admin/discussion/Discussion.vue · ×1
  • hoj-vue/src/views/admin/discussion/Discussion.vue: 446 lines of code hoj-vue/src/views/admin/discussion/Discussion.vue:1 — hoj-vue/src/views/admin/discussion/Discussion.vue has 446 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage · Test Coverage · ×1
  • Test Coverage — 0% of 131 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
R6 · Tooling · No test, lint or typecheck script · ×1
  • No test, lint or typecheck script — test ✗ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~1962 LoC) · ×1
  • Dead file (~1962 LoC) hoj-vue/src/common/api.js — no import path from any entry point (4 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 (~1871 LoC) · ×1
  • Dead file (~1871 LoC) hoj-vue/src/views/admin/problem/Problem.vue — no import path from any entry point (4 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 (~1870 LoC) · ×1
  • Dead file (~1870 LoC) hoj-vue/src/views/oj/problem/Problem.vue — no import path from any entry point (4 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 (~1779 LoC) · ×1
  • Dead file (~1779 LoC) hoj-vue/src/components/oj/group/Problem.vue — no import path from any entry point (4 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 (~1078 LoC) · ×1
  • Dead file (~1078 LoC) hoj-vue/src/views/oj/status/SubmissionList.vue — no import path from any entry point (4 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 (~1036 LoC) · ×1
  • Dead file (~1036 LoC) hoj-vue/src/components/oj/group/Contest.vue — no import path from any entry point (4 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 (~1023 LoC) · ×1
  • Dead file (~1023 LoC) hoj-vue/src/views/admin/contest/Contest.vue — no import path from any entry point (4 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 (~984 LoC) · ×1
  • Dead file (~984 LoC) hoj-vue/src/components/oj/comment/comment.vue — no import path from any entry point (4 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 (~894 LoC) · ×1
  • Dead file (~894 LoC) hoj-vue/src/components/oj/common/CodeMirror.vue — no import path from any entry point (4 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 (~886 LoC) · ×1
  • Dead file (~886 LoC) hoj-vue/src/views/admin/general/User.vue — no import path from any entry point (4 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 (~841 LoC) · ×1
  • Dead file (~841 LoC) hoj-vue/src/components/oj/common/NavBar.vue — no import path from any entry point (4 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 (~809 LoC) · ×1
  • Dead file (~809 LoC) hoj-vue/src/views/oj/discussion/discussionList.vue — no import path from any entry point (4 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 (~759 LoC) · ×1
  • Dead file (~759 LoC) hoj-vue/src/views/oj/problem/ProblemList.vue — no import path from any entry point (4 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 (~754 LoC) · ×1
  • Dead file (~754 LoC) hoj-vue/src/i18n/oj/en-US.js — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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 (~747 LoC) · ×1
  • Dead file (~747 LoC) hoj-vue/src/views/oj/contest/children/ACMContestRank.vue — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/views/oj/contest/children/ContestRank.vue) — 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 (~654 LoC) · ×1
  • Dead file (~654 LoC) hoj-vue/src/views/admin/problem/ProblemList.vue — no import path from any entry point (4 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 (~634 LoC) · ×1
  • Dead file (~634 LoC) hoj-vue/src/views/oj/contest/children/OIContestRank.vue — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/views/oj/contest/children/ContestRank.vue) — 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 (~625 LoC) · ×1
  • Dead file (~625 LoC) hoj-vue/src/views/admin/Home.vue — no import path from any entry point (4 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 (~612 LoC) · ×1
  • Dead file (~612 LoC) hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue — no import path from any entry point (4 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 (~591 LoC) · ×1
  • Dead file (~591 LoC) hoj-vue/src/views/oj/group/GroupList.vue — no import path from any entry point (4 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 (~576 LoC) · ×1
  • Dead file (~576 LoC) hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue — no import path from any entry point (4 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 (~575 LoC) · ×1
  • Dead file (~575 LoC) hoj-vue/src/views/oj/group/GroupDetails.vue — no import path from any entry point (4 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 (~551 LoC) · ×1
  • Dead file (~551 LoC) hoj-vue/src/views/oj/contest/ContestDetails.vue — no import path from any entry point (4 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 (~549 LoC) · ×1
  • Dead file (~549 LoC) REDACTED — no import path from any entry point (4 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 (~548 LoC) · ×1
  • Dead file (~548 LoC) hoj-vue/src/views/oj/status/SubmissionDetails.vue — no import path from any entry point (4 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 (~518 LoC) · ×1
  • Dead file (~518 LoC) hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue — no import path from any entry point (4 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 (~516 LoC) · ×1
  • Dead file (~516 LoC) hoj-vue/src/views/oj/group/children/GroupContestList.vue — no import path from any entry point (4 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 (~478 LoC) · ×1
  • Dead file (~478 LoC) hoj-vue/src/views/oj/group/children/GroupSetting.vue — no import path from any entry point (4 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 (~473 LoC) · ×1
  • Dead file (~473 LoC) hoj-vue/src/views/admin/general/SystemConfig.vue — no import path from any entry point (4 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 (~467 LoC) · ×1
  • Dead file (~467 LoC) hoj-vue/src/i18n/admin/en-US.js — no import path from any entry point (4 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (hoj-vue/src/i18n/index.js) — 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 (~466 LoC) · ×1
  • Dead file (~466 LoC) hoj-vue/src/router/ojRoutes.js — no import path from any entry point (4 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
R8 · Dependency Hygiene · Unused dependency '@vue/cli-plugin-router' · ×1
  • Unused dependency '@vue/cli-plugin-router' hoj-vue/package.json:48 — Declared in hoj-vue/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 '@vue/cli-plugin-vuex' · ×1
  • Unused dependency '@vue/cli-plugin-vuex' hoj-vue/package.json:49 — Declared in hoj-vue/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 'core-js' · ×1
  • Unused dependency 'core-js' hoj-vue/package.json:14 — Declared in hoj-vue/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 'vue-katex-auto-render' · ×1
  • Unused dependency 'vue-katex-auto-render' hoj-vue/package.json:34 — Declared in hoj-vue/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.
Minor — 303 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×204
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportHydroProblemManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleServiceImpl.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/RedisUtils.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 179 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java:75 — `!groupValidator.isGroupAdmin(userRolesVo.getUid(), gid) && !isRoot` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java:76 — `!groupValidator.isGroupMember(userRolesVo.getUid(), gid) && !isRoot` appears character-identically in 4 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:317 — `!isACMContest && CollectionUtil.isNotEmpty(judges)` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:137 — `!isRoot && !contest.getUid().equals(userRolesVo.getUid()) && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), cont…` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:75 — `!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)` appears character-identically in 6 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java:54 — `!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)` appears character-identically in 5 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java:128 — `!isRoot && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java:45 — `!isRoot && !isProblemAdmin && !isAdmin && !(gid != null && groupValidator.isGroupAdmin(userRolesVo.getUid(), gid))` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:158 — `!isRoot && !isProblemAdmin && !userRolesVo.getUsername().equals(problem.getAuthor())` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java:225 — `!isRoot && !isProblemAdmin && !userRolesVo.getUsername().equals(problemDto.getProblem().getAuthor())` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java:74 — `!userRolesVo.getUid().equals(contest.getUid()) && !isRoot && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)` appears character-identically in 3 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java:134 — `!userRolesVo.getUsername().equals(training.getAuthor()) && !isRoot && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java. 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 hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1777 — `"mysql".equals(this.dbType) || "aliyun_ads".equals(this.dbType)` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java, hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:585 — `Objects.equals(contest.getAllowEndSubmit(), true) && Objects.equals(contestRankDto.getContainsEnd(), true)` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScoreboardManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:323 — `Objects.equals(judge.getStatus(), Constants.Judge.STATUS_PENDING.getStatus()) || Objects.equals(judge.getStatus(), Constants.Judge.STATUS_CO…` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java:206 — `SecurityUtils.getSubject().hasRole("admin") || SecurityUtils.getSubject().hasRole("problem_admin")` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java:207 — `StringUtils.isEmpty(compileDTO.getCode()) || StringUtils.isEmpty(compileDTO.getLanguage())` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:137 — `adminContestVo.getAwardType() != null && adminContestVo.getAwardType() != 0` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java. 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 hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:691 — `connectionInitSqls != null && connectionInitSqls.size() > 0` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java, hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java. 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 hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1119 — `connectionProperties != null && connectionProperties.trim().length() != 0` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java, hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java:154 — `contest == null || !contest.getVisible()` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/ContestValidator.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java:97 — `contest.getAwardType() != null && contest.getAwardType() != 0` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java:146 — `contest.getOpenAccountLimit() && !contestValidator.validateAccountRule(contest.getAccountLimitRule(), userRolesVo.getUsername())` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java. 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 hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java:65 — `contest.getStatus().equals(Constants.Contest.STATUS_RUNNING.getCode()) && !isRoot && !contest.getUid().equals(uid)` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java, hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/ReplyEntityServiceImpl.java. 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 hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1170 — `driverClass != null && driverClass.length() > 256` appears character-identically in 2 files — hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java, hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
D10 · Test Quality · No direct assertions · ×14
  • No direct assertions: test hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/AtcoderJudgeTest.java:32 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-judgeServer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: getLanguage hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudgeTest.java:29 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-judgeServer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: getLoginCookie hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudgeTest.java:24 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-judgeServer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: getTokens hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudgeTest.java:33 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-judgeServer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: result hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudgeTest.java:20 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-judgeServer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: submit hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudgeTest.java:16 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-judgeServer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: test hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/HDUJudgeTest.java:32 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-judgeServer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: Test1 hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java:69 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-backend` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: Test2 hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java:78 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-backend` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: Test3 hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java:95 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-backend` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: Test5 hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java:105 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-backend` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: Test6 hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java:137 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-backend` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: Test7 hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java:156 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-backend` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: Test8 hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java:225 — No conventional assertion call was detected, and 7 of 7 tests in `hoj-backend` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×11
  • Hand-rolled JSON/XML parsing via regex REDACTED:199 — 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 JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:148 — 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 JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:150 — 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 JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java:191 — 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 JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/SPOJProblemStrategy.java:54 — 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 JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/SPOJProblemStrategy.java:79 — 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 JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java:454 — 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 JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java:455 — 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 JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java:456 — 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 JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/SPOJLanguageStrategy.java:135 — 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 JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/SPOJLanguageStrategy.java:136 — 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 JVM code already uses a real parser in the same package; use it here too.
D30 · Dependency Vulnerabilities · Low CVE · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
X4 · Structured logging · Interpolated log message defeats structured logging · ×3
  • Interpolated log message defeats structured logging hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/StartupRunner.java:53 — `info` at line 53 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/StartupRunner.java:54 — `info` at line 54 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/StartupRunner.java:92 — `info` at line 92 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
D10 · Test Quality · Test project verifies nothing · ×2
  • Test project verifies nothing: hoj-backend hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java:69 — No conventional assertion call was detected in 7 of 7 tests in `hoj-backend` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
  • Test project verifies nothing: hoj-judgeServer hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/AtcoderJudgeTest.java:32 — No conventional assertion call was detected in 7 of 7 tests in `hoj-judgeServer` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×2
  • Projects may be oversized for their cohesion REDACTED:1 — `hoj-springboot/DataBackup` (39379 LoC, 563 module-visible types across 107 directories) overshoots its size bounds. 2 of 5 build unit(s) (Maven, npm) overshoot their size bounds, lowering Project Cohesion to 2.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion REDACTED:1 — `hoj-springboot/JudgeServer` (9995 LoC, 102 module-visible types across 20 directories) overshoots its size bounds. 2 of 5 build unit(s) (Maven, npm) overshoot their size bounds, lowering Project Cohesion to 2.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found REDACTED:19 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 19).
D21 · Naming Consistency · `filterBySchoolORRankShowName` spells `OR` where 13 names in the project spell it `Or` · ×1
  • `filterBySchoolORRankShowName` spells `OR` where 13 names in the project spell it `Or` hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java:265 — 13 of 14 names in project hoj-backend spell the token `Or` (13 of 14; unit: names in project hoj-backend containing `Or`). Peers: AccountController.checkUsernameOrEmail (hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/AccountController.java:33); AccountController.checkUsernameOrEmail(checkUsernameOrEmailDto) (hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/AccountController.java:33); NoticeManager.updateSysOrMineMsgRead (hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java:69); AccountManager.checkUsernameOrEmail (hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:81); AccountManager.checkUsernameOrEmail(checkUsernameOrEmailDto) (hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java:81). Rename to `filterBySchoolOrRankShowName`. [rule N6]
D21 · Naming Consistency · `getOjContestsList` spells `Oj` where 27 names in the project spell it `OJ` · ×1
  • `getOjContestsList` spells `Oj` where 27 names in the project spell it `OJ` hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleService.java:10 — 27 of 29 names in project hoj-backend spell the token `OJ` (27 of 29; unit: names in project hoj-backend containing `OJ`). Peers: StartupRunner.checkRemoteOJLanguage (hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:536); StartupRunner.checkRemoteOJLanguage(remoteOJList) (hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java:536); AdminContestController.importContestRemoteOJProblem (hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java:191); AdminProblemController.importRemoteOJProblem (hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminProblemController.java:96); AdminTrainingController.importTrainingRemoteOJProblem (hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTrainingController.java:122). Rename to `getOJContestsList`. [rule N6]
D21 · Naming Consistency · `getID` spells `ID` where 35 names in the project spell it `Id` · ×1
  • `getID` spells `ID` where 35 names in the project spell it `Id` hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1876 — 35 of 36 names in project hoj-judgeServer spell the token `Id` (35 of 36; unit: names in project hoj-judgeServer containing `Id`). Peers: DruidAbstractDataSource.createConnectionId (hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1524); DruidAbstractDataSource.createStatementId (hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1528); DruidAbstractDataSource.createMetaDataId (hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1532); DruidAbstractDataSource.createResultSetId (hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1536); DruidAbstractDataSource.createTransactionId (hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1540). Rename to `getId`. [rule N6]
D27 · Navigability · High interface indirection · ×1
  • High interface indirection — 30 % of calls go through an interface — tracing a call means resolving the implementation each hop. Prefer concrete types where there's a single implementation.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Dormant codebase · ×1
  • Dormant codebase — 207 of 207 significant files have no living knowledge — the codebase as a whole is dormant, not 207 separate risks. Counted over 207 of the 693 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
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.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation docs/package.json:7 — `docs/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X5 · Nullable reference types · Java packages are not null-marked everywhere · ×1
  • Java packages are not null-marked everywhere — 0/135 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-fe85a88569ea4052af85f5b6030268d0/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-fe85a88569ea4052af85f5b6030268d0/history-1.json --exit-code 0 --source .2artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=737" --report-format json --report-path /tmp/watchdog-gitleaks-fe85a88569ea4052af85f5b6030268d0/history-2.json --exit-code 0 --source .6artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-fe85a88569ea4052af85f5b6030268d0/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .15artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .136artifacts/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: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e5c1-9b0a-7cbe-9bfe-c35d33f483ec · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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