Helen detector

Duplicate Implementation detector

The Duplicate Implementation detector finds public symbols in different files whose signatures are nearly identical. It surfaces duplicated logic or a missing shared abstraction without claiming that every similarity is wrong.

Method
Bounded code-signature similarity
Implementation policy
Advisory

What it catches

Helen selects public symbols with valid signature embeddings and compares a bounded population. A pair in different files becomes a finding at or above 0.96 similarity.

The detector excludes Storybook harness modules and same-file pairs. It caps the compared population and emitted findings so one duplicated pattern cannot flood the review surface.

Evidence Helen records

The finding names both symbol identities, file paths, symbol names, and their similarity score. Results are ranked deterministically by similarity and stable symbol order.

If source coverage is incomplete or the positive result set was truncated, Helen does not silently clear an older finding.

How to reconcile it

Share an abstraction when the two symbols implement one contract. Keep both when the similarity is intentional and their ownership must remain separate, then dismiss the finding with that rationale.

Detector boundary

It is advisory, excludes Storybook modules, and preserves findings when score coverage or result truncation prevents a complete negative assessment.

Research basis

Kamiya, T., Kusumoto, S., & Inoue, K. (2002). CCFinder: A multilinguistic token-based code clone detection system for large scale source code. IEEE Transactions on Software Engineering, 28(7), 654–670.

Related reading

Give every agent the current product picture.

Join the Helen’s Foundry early-access program.

Join the waitlist