# ExDNA v1.5.1 - Table of Contents

Code duplication detector powered by Elixir AST analysis

## Pages

- [ExDNA 🧬](readme.md)
- [LICENSE](license.md)

## Modules

- [ExDNA](ExDNA.md): Code duplication detector for Elixir, powered by native AST analysis.
- [ExDNA.AST.Annotator](ExDNA.AST.Annotator.md): Pre-processes the AST to handle annotations like `@no_clone true`.
- [ExDNA.AST.AntiUnifier](ExDNA.AST.AntiUnifier.md): Computes the *anti-unification* (most specific generalization) of two ASTs.
- [ExDNA.AST.ClauseGrouper](ExDNA.AST.ClauseGrouper.md): Groups consecutive function clauses with the same name/arity into synthetic
compound nodes so the fingerprinter can detect duplicated multi-clause functions.
- [ExDNA.AST.EditDistance](ExDNA.AST.EditDistance.md): Computes structural similarity between two ASTs using a simplified
tree edit distance.
- [ExDNA.AST.Fingerprint](ExDNA.AST.Fingerprint.md): Computes structural fingerprints (hashes) for AST subtrees.
- [ExDNA.AST.Normalizer](ExDNA.AST.Normalizer.md): Normalizes Elixir AST for structural comparison.
- [ExDNA.AST.PipeNormalizer](ExDNA.AST.PipeNormalizer.md): Normalizes pipe operators to nested function calls.
- [ExDNA.Cache](ExDNA.Cache.md): Persistent cache for fingerprinted AST fragments.
- [ExDNA.Compiler](ExDNA.Compiler.md): A `Mix.Task.Compiler` that runs clone detection incrementally.
- [ExDNA.Config](ExDNA.Config.md): Configuration for ExDNA.
- [ExDNA.Credo](ExDNA.Credo.md): ## Basics
- [ExDNA.Detection.Clone](ExDNA.Detection.Clone.md): Represents a detected code clone — a group of structurally identical fragments.

- [ExDNA.Detection.Detector](ExDNA.Detection.Detector.md): Orchestrates the clone detection pipeline.
- [ExDNA.Detection.Filter](ExDNA.Detection.Filter.md): Prunes overlapping and nested clones.
- [ExDNA.Detection.Fuzzy](ExDNA.Detection.Fuzzy.md): Type-III (near-miss) clone detection.
- [ExDNA.Detection.Grouper](ExDNA.Detection.Grouper.md): Groups clones by the directories they span so reporters can produce
higher-level summaries.

- [ExDNA.Detection.LSH](ExDNA.Detection.LSH.md): Locality-Sensitive Hashing for fast approximate nearest-neighbor search
on sub-hash sets.
- [ExDNA.LSP](ExDNA.LSP.md): Language Server Protocol server for ExDNA.
- [ExDNA.Refactor.BehaviourSuggestion](ExDNA.Refactor.BehaviourSuggestion.md): Detects clone groups where the same function is implemented identically
across multiple modules, suggesting a behaviour extraction.
- [ExDNA.Refactor.MacroSuggestion](ExDNA.Refactor.MacroSuggestion.md): Detects clone groups that should be refactored into macros rather than functions.
- [ExDNA.Refactor.Suggestion](ExDNA.Refactor.Suggestion.md): Generates refactoring suggestions from detected clones.
- [ExDNA.Report](ExDNA.Report.md): Analysis results: detected clones and summary statistics.

- [ExDNA.Reporter](ExDNA.Reporter.md): Behaviour for ExDNA output reporters.

- [ExDNA.Reporter.Console](ExDNA.Reporter.Console.md): Pretty-prints clone detection results to the terminal.
- [ExDNA.Reporter.HTML](ExDNA.Reporter.HTML.md): Generates a self-contained HTML report file for clone detection results.
- [ExDNA.Reporter.JSON](ExDNA.Reporter.JSON.md): Outputs clone detection results as JSON to stdout.
- [ExDNA.Reporter.SARIF](ExDNA.Reporter.SARIF.md): Outputs clone detection results in SARIF 2.1.0 format.

## Mix Tasks

- [mix ex_dna](Mix.Tasks.ExDna.md): Scans your project for duplicated code blocks using AST analysis.
- [mix ex_dna.explain](Mix.Tasks.ExDna.Explain.md): Deep-dive into a specific clone, showing the anti-unification result,
the common structure, the divergence points (holes), and the suggested
refactoring.
- [mix ex_dna.lsp](Mix.Tasks.ExDna.Lsp.md): Starts the ExDNA Language Server Protocol server over stdio.

