Renaming variables and extracting helpers is the cheapest way to defeat a naive similarity checker, and the fix is not a better diff. This walks through the normalization stack that makes refactoring-resistant plagiarism detection work, from token streams to winnowing to tree edit distance, and is honest about the precision you pay for each step.