Runs the configured algorithms on the presented trees (cloneTree) of the index. With against, only pairs of a fragment of index and one of against (whose fragments are marked external) are reported. Each algorithm reports at most maxPairs pairs.
against
index
external
maxPairs
the code to check, built with CloneIndex.build
see DefaultCloneDetectionConfig
Optional
an index of the same perspective to search index in, e.g., from CloneIndex.deserialize
const { pairs } = detectClones(await CloneIndex.build(analyzer, { perspective: ClonePerspective.Canonical }), DefaultCloneDetectionConfig); Copy
const { pairs } = detectClones(await CloneIndex.build(analyzer, { perspective: ClonePerspective.Canonical }), DefaultCloneDetectionConfig);
Runs the configured algorithms on the presented trees (cloneTree) of the index. With
against, only pairs of a fragment ofindexand one ofagainst(whose fragments are markedexternal) are reported. Each algorithm reports at mostmaxPairspairs.