Contact Us

Code refactoring at a scale your IDE was never built for

Your codebase may need the same structural change in thousands of places: splitting a god class, retiring or standardizing an API, or untangling complex GOTO-based logic. IDE refactoring tools often have limited scope, regex scripts cannot reliably interpret code semantics, and GenAI agents can produce inconsistent results across runs.

With DMS, our compiler-grade transformation engine, we define the change through our proprietary rewrite rules engine and apply it systematically across millions of lines of code in more than 40 languages. DMS combines proprietary pattern-matching technology with structural and semantic analysis to locate every instance that meets the rule's criteria and apply the appropriate transformation.

Names and types are resolved to help ensure changes target the intended code elements, and affected call sites can be updated consistently. DMS also preserves comments and source layout where appropriate. The result is scalable, repeatable refactoring, with testing used to verify that the transformed code continues to behave as intended.

Book A Free Refactoring Assessment
30+ yrs
Compiler Engineering
40+
Source Languages
PhD
Average Team Seniority
TRUSTED BY
NASA
Boeing
RTX
Rockwell Automation
Global Shop Solutions
BlackRock
ANZ
Northrop Grumman
Emerson
WHAT WE REFACTOR

A catalogue of refactorings, each one a tested rule

Martin Fowler defines refactoring as restructuring software "without changing its observable behavior" (refactoring.com). That is the contract for every rule below. The difference is reach: each one runs over the whole system, identically, in one pass.

Refactoring
What changes in your code
RefactoringGod class splitting
What changes in your codeOversized classes broken into cohesive ones. Every caller, declaration and reference across the codebase is updated to match.
RefactoringAPI and framework migration
What changes in your codeEach usage pattern of the old API becomes a rule. The rule set is applied everywhere the pattern occurs, so the last call site moves with the first.
RefactoringDead code removal
What changes in your codeUnreachable and unused code found by control- and data-flow analysis across files, then removed.
RefactoringClone removal
What changes in your codeExact and near-miss duplicates found on the syntax tree and replaced with a shared abstraction. See clone detection and removal.
RefactoringGOTO to structured code
What changes in your codeCOBOL GO TO and PERFORM THRU ranges, VB6 GoTo and Fortran arithmetic IF restructured into loops, conditionals and calls.
RefactoringNested IFs to CASE/switch
What changes in your codeChains of IFs testing the same variable become one CASE or switch statement.
RefactoringExtract block to function or method
What changes in your codeA block of code becomes a function or method, with its parameters inferred from what the block reads and writes.
RefactoringScoped renaming
What changes in your codeIdentifiers renamed by symbol, within their scope, not by string. Same-named identifiers elsewhere stay untouched.
RefactoringDialect upgrades
What changes in your codeC++98/03 idioms moved to modern C++: smart pointers, standard algorithms. See C++ modernization.
RefactoringPreprocessor conditional removal
What changes in your code#if branches for retired platforms and features removed. Semantic Designs puts the manual effort across thousands of files at man-years; the tool does it in a day.
RefactoringAPI restructuring for a different OS
What changes in your codePlatform-specific calls restructured so the same code targets another operating system.
RefactoringStyle-check repairs and reformatting
What changes in your codeRule violations repaired automatically; code reformatted to your house standard.
RefactoringGenerated documentation
What changes in your codeFunction and method documentation inserted from facts extracted from the code itself.
WHY TEXT-LEVEL TOOLS STOP SHORT

Why IDE refactorings, clang-tidy, regex scripts and LLM agents don't cover this

Those tools are fine for a rename inside one project. A system-wide campaign hits hazards they were not built for. DMS was, and deterministic transformation is why.

Hazard
How DMS handles it
HazardPreprocessor configurations: IDEs and clang-tidy see only the configuration they compile, so code under other #if branches is never touched.
How DMS handles itDMS parses C and C++ with the preprocessor structure intact, across build configurations, so every branch gets the same refactoring.
HazardTemplates and overloads: a regex can't tell which overload a call binds to, and an LLM guesses.
How DMS handles itNames and types are resolved before anything changes. A rule fires only on the declaration it targets.
HazardCross-file consistency: IDE refactorings stay inside a loaded project; scripts edit one file at a time.
How DMS handles itControl- and data-flow analysis runs across files. Declarations, definitions and call sites change together.
HazardMulti-language systems: each IDE knows one language, and refactoring tools for COBOL or Fortran barely exist.
How DMS handles itOne engine with full compiler front ends for 40+ languages, legacy ones included.
HazardMillions of call sites: interactive tools apply one change at a time; agents run out of context.
How DMS handles itRules run in parallel over multi-million-line systems. Tableau's 5,000+ modules took under three months.
HazardDeterminism and repeatability: an LLM agent produces different edits each run; scripts drift as the code moves.
How DMS handles itSame input, same output. Re-run the rules on today's code and get the same result as yesterday's.
HazardReviewability: thousands of hand or AI edits each need human judgment.
How DMS handles itYour team reviews the rule once, then spot-checks diffs. Structure-aware diffing separates real edits from layout noise.
PROOF

Refactoring campaigns already in production

4M+
Lines of C++
5,000+
Modules refactored
< 3 months
Start to finish

Tableau

4M+ lines of C++ with god classes and widespread API usage. More than 5,000 modules refactored in under three months.

Boeing

5M+ lines of C++ avionics mission software restructured into a CORBA-compatible component architecture. The work is peer-reviewed and published.

Payroll Processing

HLASM assembler converted to maintainable C, with control flow reconstructed so the result reads as structured code.

SIGNS YOU NEED THIS

When refactoring stops being a ticket and becomes a campaign

  1. 1

    The rename nobody will approve

    The change is obvious, but it touches thousands of files and nobody trusts search-and-replace with it.

  2. 2

    One class everyone edits

    A god class sits on every critical path, causes merge conflicts weekly, and can't be split by hand without freezing the team.

  3. 3

    An API you can't retire

    An old framework or internal library is called from thousands of places, so the migration slips to next year. Again.

  4. 4

    Code only its author could follow

    GOTO tangles, IFs nested ten deep, #if blocks for platforms retired a decade ago. Every change costs a day of reading first.

HOW DELIVERY WORKS

Four steps from first measurement to merged code

  1. 01

    Assess and measure

    We parse the whole codebase under NDA and measure what the campaign will change: class sizes, clone rates, dead-code volume, API usage counts. You get a complexity report, automation estimate and rough timeline in about 5 business days.

  2. 02

    Define rules

    Your architects agree the target structure; we encode it as rewrite rules over the syntax tree, with names and types resolved. Every refactoring is written down and reviewable.

  3. 03

    Run on a slice and review diffs

    The rules run on a representative module first. Your engineers review the diffs, and we fix rules, not individual edits, until the output is what you would have written by hand.

  4. 04

    Scale, test, merge

    The rule set runs across the whole system and the result is checked against your builds and test suites. Because rules re-run on the latest code, there is no code freeze.

ENGAGEMENT SHAPES

Pick the shape that fits the problem

Refactoring campaign

A defined set of refactorings, such as god class splits, dead code and GOTO removal, applied across the system at a fixed price.

API or framework migration

Old API usage moved to the new one as a rule set, including the call sites nobody remembered.

Codebase cleanup

Dead code, clones, style violations and stale preprocessor conditionals removed, with before/after metrics to show for it.

Custom refactoring tool

We package the rule set as a tool your engineers run on your own servers, whenever the code changes.

OUTCOMES

What changes after a campaign

Before the campaign
After the campaign
Before the campaignGod classes with thousands of dependents
After the campaignCohesive classes, every call site updated
Before the campaignAn old API called from thousands of places
After the campaignOne API; old usage count measured down to zero
Before the campaignDead and duplicated code nobody dares delete
After the campaignMeasured, removed, with before/after counts
Before the campaignGOTO tangles and deeply nested IFs
After the campaignStructured loops, calls and CASE statements
Before the campaign#if branches for platforms you no longer ship
After the campaignOnly the configurations you still build
Before the campaignEvery large change needs a code freeze
After the campaignRules re-run on the latest code; the team keeps shipping
Before the campaignThousands of hand edits reviewed one by one
After the campaignRules reviewed once, diffs spot-checked
Before the campaignRefactoring as a one-off heroic effort
After the campaignA rule set you can run again next year
RELATED SERVICES

Where refactoring fits with the rest of the work

Engineers reviewing a system dependency map

Ten thousand call sites. One rule. Zero typos.

Tell us the refactoring your team keeps deferring, and we'll show you what it looks like as a rule set.

Book A Free Refactoring Assessment
FAQ

The questions weget asked the most

General questions

Restructuring your code without changing what it does, at the scale of the whole system. We encode each refactoring, such as a god class split, an API migration or GOTO removal, as rules for DMS, our compiler-grade transformation engine. DMS parses every file, resolves names and types, applies the rules identically everywhere and regenerates source with your comments and layout intact. You get the refactored code and before/after metrics, not a slide deck of recommendations.

No. Those tools are good at local, interactive changes inside one language and one build configuration. clang-tidy sees the configuration it compiles, so code under other #if branches is missed. IDE refactorings work inside a loaded project and offer a fixed menu. DMS handles every preprocessor configuration, works across files and languages, runs custom rules you can't express as an IDE menu item, and produces the same result every time.

That is the acceptance bar. Every rule resolves names and types before it changes anything, so it can't silently rebind a call. Results are checked against your builds and test suites before handover. Where test coverage is thin, we measure it with branch-coverage tooling first, so everyone knows what the tests actually exercise. Rules are fixed and re-run, never hand-patched, so a problem gets fixed everywhere at once.

Multi-million-line systems are the normal case, not the stretch goal. At Tableau, more than 5,000 modules across 4M+ lines of C++ were refactored in under three months. Boeing's 5M+ line avionics C++ was restructured into a component architecture. DMS runs in parallel, and because the work is rule-based, effort grows mostly with the number of distinct refactorings, not the number of lines.

DMS has full compiler front ends for 40+ languages, including C, C++, C#, Java, COBOL, Fortran, VB6 and assembler, and it handles mixed systems where one change crosses language boundaries. Legacy languages matter most here, because IDE refactoring support for COBOL or Fortran barely exists. If your dialect or in-house language is unusual, we build the grammar for it first.

No. We work on a snapshot while your team keeps committing. When the rules are proven, we re-run them on the latest code, so nothing your engineers wrote in the meantime is lost or needs re-merging by hand. Deterministic rules make that cheap: the same rule on the new head gives the result you already reviewed, plus the same change applied to the new code.

Gen AI works around the engine, not inside it. We use it for documentation, code comprehension, module summaries, test generation and code review support. The refactorings themselves are deterministic DMS rules: same input, same output, reviewable before they run. An LLM never decides what your production code becomes. Our article on why Gen AI alone is not enough explains the reasoning.

You do. The refactored source is ordinary code in your language, and it carries no runtime royalties. Your engineers maintain it like any other code they own. If you choose the custom-tool engagement, your engineers get a rule set they run themselves on future changes, and the terms are agreed in the fixed-price proposal.

Send a short note with rough line counts, languages and the refactoring you have in mind. Under NDA, we run a free codebase assessment and return a complexity report, an automation estimate and a rough timeline in about 5 business days. After that, we quote a fixed price. Most teams start with one refactoring on one slice of the system.