A rise in code churn deserves a closer look at the changes behind it. The team may be working through a planned migration, correcting a recurring defect, or simply reporting on a different mix of files. Each explanation leads to a different decision, so asking everyone to reduce churn before checking the work can send the team after the wrong problem.
Code churn measures changes to code over time, although some tools focus specifically on changes to recently introduced code. To interpret the result, establish what the calculation counts, trace the changes to their purpose, and check whether that purpose is being achieved. The percentage alone cannot tell you how much engineering time was wasted.
Start with the calculation
A code churn rate only has a clear meaning when you know its numerator, denominator, and observation window. The Git diff documentation describes counts of added and deleted lines, but those totals alone do not identify which lines were recently written or why someone changed them. Turning a change count into a measure of recent rework requires additional rules and history.
Definitions also vary across tools. In its Rework documentation, LinearB describes a percentage based on classified changes to recently introduced code, with rules for age, file inclusion, and change classification. A number produced under those rules cannot be compared directly with a rate calculated over a group of newly added lines. Check the definition behind your own report before comparing results.
A hypothetical group contains 1000 original lines of application code introduced on the main branch. Each line is observed for a full 14 days after its introduction, with original lines that are modified or deleted during that time counted as revisited. If 300 distinct original lines are revisited, the rate for this group is 30 percent. A line changed several times still enters the numerator once, while new lines added during observation stay outside the original group.
This example excludes generated files, lockfiles, formatting changes, and code that was only moved. Its window of 14 days is a choice for the example, and the full observation period must have elapsed for every line. A group containing lines that have only had a day to be revisited would not yet support this comparison. The result measures the share of original lines revisited, without measuring hours spent or the number of repeated edits.
Follow the changed code
Start with the files and pull requests that account for the increase, then read the changes together with their descriptions and linked issues. A repository total can combine unrelated work, so narrowing the investigation to an integration or business rule gives you something specific to discuss with the engineers involved. Ask what changed in that area and which changes were expected to be temporary.
Check whether the reporting rules changed along with the number. A newly included repository or a different file filter changes what you are looking at, while generated code and formatting may account for changes outside the application logic you want to investigate. Keep the full result available and document any separate view, so the team can tell a change in reporting from a change in the work. File and branch inclusion rules are part of how a tool defines its result.
The denominator deserves attention too. Under the hypothetical rule above, 300 revisited lines out of 1000 gives 30 percent, while 300 out of 600 gives 50 percent. The count of distinct revisited lines is unchanged, although the rate has risen. Compare what was written in each group before concluding that the team is doing more corrective work.
Read the reason for the rewrite
The reason for a rewrite comes from the work behind the change. A line history can establish that code was revisited, but the migration plan, review discussion, or linked bug helps explain why it happened. Use those records to separate an expected adjustment from a correction that keeps returning. A classification based on code age does not establish the business purpose of a change.
In one hypothetical scenario, a team revisits 300 of 1000 original lines while migrating an integration, using the same rule of observing every line for 14 full days. The plan calls for adapting the new integration code as each migration stage is completed, and the pull requests record those adjustments and their compatibility checks. The team needs to establish whether the migration is meeting its completion criteria, including whether temporary code has been retired. Its 30 percent rate does not establish that the migration is going well simply because the changes were planned.
In a second hypothetical scenario, another group has the same 30 percent rate under the same rules. This time, linked bugs show that a product eligibility rule repeatedly accepts requests it should reject, and the pull requests contain successive corrections to that behavior. The investigation has a specific defect to address, including the conditions that still reproduce it and the tests that should catch it. An instruction to lower the rate would leave that engineering decision unresolved.
Refactoring needs the same care in interpretation. Martin Fowler defines refactoring as changing the internal structure of existing code while preserving its external behavior. A planned migration may include refactoring, but it may also change behavior or replace an integration. Use the purpose and effect of the changes to describe the work, rather than assuming that an age category in a report establishes what kind of work occurred.
Act on the confirmed cause
Choose an action that addresses what the investigation established. The table below connects an observed pattern to the evidence needed before making that choice. It is a way to organize the investigation, and each row still requires someone to inspect the changes.
| What changed | What to check | What to do |
|---|---|---|
| The changes are part of a planned migration. | Check whether each stage passes compatibility tests and meets its completion criteria. | Check that the changes follow the plan and that temporary code is being removed. |
| The same problem returns after fixes. | Read the bugs and PRs to see when the failure happens and which tests exist. | Fix the defect and add a test that catches it. |
| Much of the change comes from generated files or formatting. | Check which files entered the report and what changed in them. | Review these changes separately and document the report filters. |
| The rate rose while fewer new lines were written. | Compare new and revisited lines using the same counting rules. | Check the work in both groups before concluding that rework increased. |
For the recurring defect, review whether the correction handles the failing condition and whether the test would detect another recurrence. Google's code review guidance asks reviewers to examine functionality and test usefulness, which gives the discussion a concrete focus. Review the relevant code review practices if the PR history shows that this check was missing.
Check what improved
At the next review, check whether the problem that prompted the action has returned in comparable work. For the eligibility rule, inspect whether the same failing condition produces another bug. For the migration, check progress against the agreed completion criteria and whether the intended compatibility checks pass. These observations let you evaluate the action against its purpose.
Keep the calculation and observation window consistent when you compare churn, and read it alongside the relevant software quality metrics and delivery results. A lower rate would be little help if engineers were postponing a necessary correction to avoid revisiting recent code. Even when churn falls after an intervention, that sequence alone does not establish that the intervention caused the decline.
Document the change and explain which evidence justified it, then specify what you will inspect at the next review. For a recurring defect, link the corrective PR to the condition that reproduces it and check any subsequent bug linked to that behavior. Those records give the team a basis for deciding whether the next change should address the same problem or a different one.

