import { DuplicateGroup } from '../types.js'; export declare class CodeSimilarityDetector { private projectDir; constructor(projectDir: string); /** * Scan all source files for duplicate code blocks. * Returns groups of blocks whose pairwise similarity >= minSimilarity. */ detectDuplicates(minSimilarity?: number): Promise; /** * Walk the project tree, read each source file, and extract code blocks. */ private collectAllBlocks; /** * Split a single file into code blocks by tracking brace depth. * Recognises the block type (function, method, class, generic block). * Only returns blocks with >= 6 lines. */ private extractBlocks; /** * Compute Jaccard similarity between two code blocks. * Tokenises content into word tokens, then calculates |intersection| / |union|. */ private computeSimilarity; /** * Split content into individual word tokens and return as a Set. * Strips punctuation and normalises to lowercase for comparison. */ private tokenize; /** * Generate a refactoring suggestion based on the types of the duplicate blocks. */ private suggestRefactor; /** * Walk a directory tree, returning full paths of source files. */ private walkDir; /** * Produce a unique key for a block (file path + line range). */ private blockKey; } //# sourceMappingURL=code-similarity.d.ts.map