repowiserepowise
Sign in
openmrs/openmrs-core
OverviewDocsArchitectureKnowledge GraphFilesCode HealthSecurityRefactoring

People & History

CommitsContributorsDecisions
Chat
Stats
repowiserepowise
ExplorePricingDocs
Sign in
repowiseopenmrs/openmrs-core
OP
OP

openmrs / openmrs-core

javamaster5167075157.5K linessynced 2mo ago

Code health

7.4out of 10Good

This codebase scores 7.4 out of 10 for code health, which we rate good. It also scores maintainability 7.8 and static performance 9.5 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 2 of 2,318 files are git hotspots, and they average 2.7 — which is where the fixes pay off most.

Full health report →
Documentation1,373pages281 with model-written prose, 1,092 built from the indexScore validation8/2012.0× baselineTop-ranked files that did go on to need a bug fixDead code65exportsUnused exports that nothing in the graph reaches

Do next

4 things worth doing this quarter.

Worth planning

  • Break up copyCustomizationIntoWebapp (CCN 11, 50 lines)

    web/src/main/java/org/openmrs/web/Listener.java:462

    copyCustomizationIntoWebapp nests its control flow deeply, and part of it is duplicated, so splitting it also removes a copy.

    gain
    up to +1.0 health on this file(inferred)
    finding
    Nested complexity
    size
    CCN 11, 50 lines, nests 8 deep
    severity
    critical
    Medium effort, worth a check
  • Break up doPost (CCN 62, 351 lines)

    web/src/main/java/org/openmrs/web/filter/initialization/InitializationFilter.java:649

    doPost nests its control flow deeply, and part of it is duplicated, so splitting it also removes a copy; changed 3 times in 90 days.

    gain
    up to +0.7 health on this file(inferred)
    finding
    Nested complexity
    size
    CCN 62, 351 lines, nests 7 deep
    severity
    critical
    Medium effort, worth a check
  • Delete 56 unused symbols and files (5,341 lines)

    Nothing in the graph reaches them, across 51 files; every reader and agent pays to skip them.

    symbols
    56
    lines
    5,341
    safe to delete
    Yes(inferred)
    Medium effort
  • Break up execute (CCN 18, 88 lines)

    api/src/main/java/org/openmrs/util/databasechange/GenerateUuid.java:135

    execute nests its control flow deeply.

    gain
    up to +2.0 health on this file(inferred)
    finding
    Nested complexity
    size
    CCN 18, 88 lines, nests 8 deep
    severity
    critical
    Medium effort, worth a check

Improve what Repowise can see

  • Add a test coverage report

    Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.

    line coverage
    Unknown, no report
    Small effort
Lines of code
157.5K
Files
2,318
Symbols
17,244
Modules
6
Languages
4

Recent activity

All commits →

Commits

  • 5167075cmaven(deps): bump org.apache.lucene:lucene-analysis-phonetic (#6227)3mo ago
  • bf7e37a1TRUNK-6650: Verify database authentication in startup.sh before starting Tomcat (#6193)3mo ago
  • 8ec94d21Fix OWASP dependency check CI failure on fork PRs without NVD_API_KEY (#6210)3mo ago
  • b8e70f6aUse PipeParser for inbound HL7 to remove XML/XXE attack surface (#6223)3mo ago
  • a9bd0881maven(deps): bump org.apache.tomcat:tomcat-jasper (#6221)3mo ago
  • ab66811agithub-actions(deps): bump actions/cache from 5 to 6 (#6220)3mo ago

Decisions

  • Add Liquibase Maven Plugin and Liquibase snapshots; upgrade liquibase-core to 3.8.9proposed
  • Adopt JobRunr as default scheduler backendproposed
  • Annotate privilege constants for startup registrationproposed
  • Avoid resetting Log4J2 context via LogManager#getContextproposed
  • Cache default locale and allowed locale listproposed
  • Cache handler resolution with WeakHashMapproposed
▸

Everything we found

2,385 open

Every detector's open count by area, each with its worst example. An inventory, not a to-do list: the actions above are the part worth doing.

  • worst item is critical severity. Code health1,627Untested hotspot · api/src/main/java/org/openmrs/module/ModuleUtil.java45 findings · 10.0 deducted→
  • worst item is medium severity. Refactoring244<anonymous>+1.5 health, L effort · webapp/src/main/webapp/WEB-INF/csrfguard.js→
  • worst item is medium severity. Decisions112web/src/test/java/org/openmrs/web/filter/initialization/InitializationFilterE2ETest.java110 awaiting review · 2 hotspots ungoverned→
  • worst item is medium severity. Ownership323api/src/main/java/org/openmrs/logging/LoggingConfigurationGlobalPropertyListener.java100% single-owner concentration, 1 commits in 90d→
  • worst item is low severity. Dead code79OpenmrsYamlConfigurationUnreachable class (11 lines)→

Composition

Open the graph →
java 98%
javascript 1%shell 1%dockerfile 0%

Explore this codebase

  • Docs1,373 pages across 6 modules→
  • ChatAsk this codebase a question and get an answer with its sources.→
  • Files2,318 files with per-file docs, health and history→
  • ArchitectureDependency graph, layers, and 228 entry points→
  • Code healthPer-file scores, 1,829 open findings, coverage and refactoring targets→
  • Knowledge graphEntities, communities, and the paths between them→
  • Change couplingFiles that keep changing together, mined from commit history→
  • CommitsChange-risk ranked history with agent provenance→
  • ContributorsBus factor, per-file maintainers, and the human/agent split→
  • StatsSize class, origin, lifetime churn, rhythm and records→
  • CostsWhat indexing this snapshot cost, by model and by run.→