Before: pricing_before.py
def calculate_tax(total):
return total * 0.18
def format_total(total):
return f"₹{total:.2f}"Moved-code comparison
When a function changes position, a raw line diff can make unchanged behaviour look deleted and re-added. AlignDiff searches for the related structure before presenting its line-level edits.

Minimal input fixture
These are labelled input excerpts, not simulated comparator output.
pricing_before.pydef calculate_tax(total):
return total * 0.18
def format_total(total):
return f"₹{total:.2f}"pricing_after.pydef format_total(total):
return f"₹{total:.2f}"
def calculate_tax(total):
return total * 0.18calculate_tax change, or did it only move? Structural pairing lets the reviewer answer that directly.How AlignDiff handles movement
Functions, classes, methods, and other supported entities are collected from both files.
Name, structure, content, and source context contribute to automatic pairing.
A paired block can be marked moved, modified, renamed, or a combination instead of becoming unrelated deletion and insertion noise.
Reviewer guidance
A moved label helps focus the review, but the detailed rows still matter. Check changed calls, return expressions, parameters, and newly inserted statements before accepting the refactor.
When several functions are similar, inspect the pairing reasons and use manual pairing rather than assuming the first automatic match is correct.
Continue exploring