Identifying the ancestry of a software project is often complicated by the fact that developers frequently rename functions, rewrite logic, or port the software into entirely different programming languages. Traditional methods of tracking these lineages often rely on matching source text or function names. However, a study of 43 descendants of the original DOOM source code demonstrates that these labels can be misleading. For example, 'Chocolate Doom' retains 87% of the original's function names, yet only 35% of the actual code inside those functions remains unchanged. In other cases, like 'Doom Retro,' the names are kept while nearly 100% of the internal code is rewritten.
To overcome the limitations of human-readable text, researchers used a code-measuring engine that ignores names and comments entirely. Instead, it analyzes the 'shape' of a program by recording dozens of measurements for every function, including its length, branching patterns, and which other functions it calls. By identifying 'look-alike' functions whose measurements match too closely to be coincidental, the engine can identify copies with 93% accuracy. This structural fingerprint is robust enough to distinguish DOOM from unrelated C programs like Quake or Quake II, which share between 0% and 0.6% of DOOM's shape.

The image illustrates the concept of a program's 'shape' or structural fingerprint that survives across different versions and ports.
When a project is completely rewritten in a new language, such as Go or Scheme, the individual function shapes may disappear, but the 'wiring'—the map of which game subsystems (like the renderer or physics) call one another—often survives. In a blind test where all names were hidden, the Go translation still sorted 60% of its functions into the correct game parts, significantly outperforming a random guess of 20%. However, this structural blueprint is not universal. Ports in languages like Java, Kotlin, and C# showed no detectable lineage because they reorganized the code into tiny, fragmented pieces (often three lines or fewer), effectively erasing the original design's signature. This highlights a critical trade-off: while structural analysis can track lineage through most ports, it fails when the architectural 'shape' is fundamentally dismantled during the translation process.