[{"data":1,"prerenderedAt":588},["ShallowReactive",2],{"navigation_docs":3,"trending-repo-p-e-w\u002Fheretic":249,"page-views-\u002Ftrending\u002Fp-e-w\u002Fheretic":586},[4,29,104,124,194],{"title":5,"icon":6,"path":7,"stem":8,"children":9},"Start",false,"\u002Fstart","1.start",[10,14,19,24],{"title":11,"path":7,"stem":12,"icon":13},"What jscpd finds","1.start\u002Findex","i-lucide-house",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fstart\u002Finstallation","1.start\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quickstart","\u002Fstart\u002Fquickstart","1.start\u002F3.quickstart","i-lucide-rocket",{"title":25,"path":26,"stem":27,"icon":28},"Configuration basics","\u002Fstart\u002Fconfiguration","1.start\u002F4.configuration","i-lucide-settings-2",{"title":30,"icon":6,"path":31,"stem":32,"children":33,"page":6},"Guides","\u002Fguides","2.guides",[34,39,44,49,54,59,64,69,74,79,84,89,94,99],{"title":35,"path":36,"stem":37,"icon":38},"Use jscpd in CI","\u002Fguides\u002Fci","2.guides\u002F01.ci","i-lucide-github",{"title":40,"path":41,"stem":42,"icon":43},"Pre-commit hooks","\u002Fguides\u002Fpre-commit","2.guides\u002F02.pre-commit","i-lucide-git-commit",{"title":45,"path":46,"stem":47,"icon":48},"Fail only on new duplication","\u002Fguides\u002Fbaseline","2.guides\u002F03.baseline","i-lucide-git-compare",{"title":50,"path":51,"stem":52,"icon":53},"Monorepos","\u002Fguides\u002Fmonorepos","2.guides\u002F04.monorepos","i-lucide-folder-tree",{"title":55,"path":56,"stem":57,"icon":58},"Cross-format detection","\u002Fguides\u002Fcross-format","2.guides\u002F05.cross-format","i-lucide-layers",{"title":60,"path":61,"stem":62,"icon":63},"Agents","\u002Fguides\u002Fagents","2.guides\u002F06.agents","i-lucide-cpu",{"title":65,"path":66,"stem":67,"icon":68},"Editors","\u002Fguides\u002Feditors","2.guides\u002F07.editors","i-lucide-code",{"title":70,"path":71,"stem":72,"icon":73},"Duplication over git history","\u002Fguides\u002Fhistory","2.guides\u002F08.history","i-lucide-chart-no-axes-combined",{"title":75,"path":76,"stem":77,"icon":78},"Dashboard and health score","\u002Fguides\u002Fdashboard","2.guides\u002F09.dashboard","i-lucide-layout-dashboard",{"title":80,"path":81,"stem":82,"icon":83},"Dead code","\u002Fguides\u002Fdead-code","2.guides\u002F10.dead-code","i-lucide-ghost",{"title":85,"path":86,"stem":87,"icon":88},"Comparing two codebases","\u002Fguides\u002Fcompare","2.guides\u002F11.compare","i-lucide-git-compare-arrows",{"title":90,"path":91,"stem":92,"icon":93},"Semantic clones","\u002Fguides\u002Fsemantic-clones","2.guides\u002F12.semantic-clones","i-lucide-brain-circuit",{"title":95,"path":96,"stem":97,"icon":98},"Similar functions","\u002Fguides\u002Fsimilarity","2.guides\u002F13.similarity","i-lucide-list-tree",{"title":100,"path":101,"stem":102,"icon":103},"Boundaries","\u002Fguides\u002Fboundaries","2.guides\u002F14.boundaries","i-lucide-fence",{"title":105,"icon":6,"path":106,"stem":107,"children":108,"page":6},"Concepts","\u002Fconcepts","3.concepts",[109,114,119],{"title":110,"path":111,"stem":112,"icon":113},"Types of code clones","\u002Fconcepts\u002Fclone-types","3.concepts\u002F1.clone-types","i-lucide-copy",{"title":115,"path":116,"stem":117,"icon":118},"How detection works","\u002Fconcepts\u002Fhow-detection-works","3.concepts\u002F2.how-detection-works","i-lucide-scan-search",{"title":120,"path":121,"stem":122,"icon":123},"The health score","\u002Fconcepts\u002Fhealth-score","3.concepts\u002F3.health-score","i-lucide-heart-pulse",{"title":125,"icon":6,"path":126,"stem":127,"children":128,"page":6},"Reference","\u002Freference","4.reference",[129,134,139,144,181,186,190],{"title":130,"path":131,"stem":132,"icon":133},"CLI options","\u002Freference\u002Fcli","4.reference\u002F1.cli","i-lucide-terminal",{"title":135,"path":136,"stem":137,"icon":138},"The config file","\u002Freference\u002Fconfig-file","4.reference\u002F2.config-file","i-lucide-settings",{"title":140,"path":141,"stem":142,"icon":143},"Exit codes","\u002Freference\u002Fexit-codes","4.reference\u002F3.exit-codes","i-lucide-log-out",{"title":145,"icon":6,"path":146,"stem":147,"children":148},"Reporters","\u002Freference\u002Freporters","4.reference\u002F4.reporters\u002Findex",[149,151,156,161,166,171,176],{"title":145,"path":146,"stem":147,"icon":150},"i-lucide-file-chart-column",{"title":152,"path":153,"stem":154,"icon":155},"HTML reporter","\u002Freference\u002Freporters\u002Fhtml","4.reference\u002F4.reporters\u002F2.html","i-lucide-file-code",{"title":157,"path":158,"stem":159,"icon":160},"JSON reporter","\u002Freference\u002Freporters\u002Fjson","4.reference\u002F4.reporters\u002F3.json","i-lucide-braces",{"title":162,"path":163,"stem":164,"icon":165},"Badge reporter","\u002Freference\u002Freporters\u002Fbadge","4.reference\u002F4.reporters\u002F4.badge","i-lucide-award",{"title":167,"path":168,"stem":169,"icon":170},"SARIF reporter","\u002Freference\u002Freporters\u002Fsarif","4.reference\u002F4.reporters\u002F5.sarif","i-lucide-shield-check",{"title":172,"path":173,"stem":174,"icon":175},"CodeClimate reporter","\u002Freference\u002Freporters\u002Fcodeclimate","4.reference\u002F4.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":177,"path":178,"stem":179,"icon":180},"OpenMetrics reporter","\u002Freference\u002Freporters\u002Fopenmetrics","4.reference\u002F4.reporters\u002F7.openmetrics","i-lucide-activity",{"title":182,"path":183,"stem":184,"icon":185},"Supported formats","\u002Freference\u002Fsupported-formats","4.reference\u002F5.supported-formats","i-lucide-languages",{"title":187,"path":188,"stem":189,"icon":38},"GitHub Action","\u002Freference\u002Fgithub-action","4.reference\u002F6.github-action",{"title":191,"path":192,"stem":193,"icon":68},"Rust crates","\u002Freference\u002Frust-crates","4.reference\u002F7.rust-crates",{"title":195,"icon":6,"path":196,"stem":197,"children":198,"page":6},"Project","\u002Fproject","5.project",[199,204,209,214,239,244],{"title":200,"path":201,"stem":202,"icon":203},"Changelog","\u002Fproject\u002Fchangelog","5.project\u002F1.changelog","i-lucide-scroll-text",{"title":205,"path":206,"stem":207,"icon":208},"Migrating from v4 to v5","\u002Fproject\u002Fmigration","5.project\u002F2.migration","i-lucide-arrow-right-left",{"title":210,"path":211,"stem":212,"icon":213},"jscpd v4 (TypeScript)","\u002Fproject\u002Fv4","5.project\u002F3.v4","i-simple-icons-typescript",{"title":215,"icon":6,"path":216,"stem":217,"children":218},"Benchmarks","\u002Fproject\u002Fbenchmarks","5.project\u002F4.benchmarks\u002Findex",[219,221,226,230,235],{"title":215,"path":216,"stem":217,"icon":220},"i-lucide-gauge",{"title":222,"path":223,"stem":224,"icon":225},"Detection Speed","\u002Fproject\u002Fbenchmarks\u002Fdetection-speed","5.project\u002F4.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":227,"path":228,"stem":229,"icon":58},"Multi-Format Detection","\u002Fproject\u002Fbenchmarks\u002Fcross-format","5.project\u002F4.benchmarks\u002F3.cross-format",{"title":231,"path":232,"stem":233,"icon":234},"AI Token Efficiency","\u002Fproject\u002Fbenchmarks\u002Fai-token-efficiency","5.project\u002F4.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":236,"path":237,"stem":238,"icon":93},"Embedding Models","\u002Fproject\u002Fbenchmarks\u002Fembedding-models","5.project\u002F4.benchmarks\u002F5.embedding-models",{"title":240,"path":241,"stem":242,"icon":243},"Research","\u002Fproject\u002Fresearch","5.project\u002F5.research","i-lucide-graduation-cap",{"title":245,"path":246,"stem":247,"icon":248},"Articles","\u002Fproject\u002Farticles","5.project\u002F6.articles","i-lucide-newspaper",{"name":250,"url":251,"appearances":252,"latest":268},"p-e-w\u002Fheretic","https:\u002F\u002Fgithub.com\u002Fp-e-w\u002Fheretic",[253],{"date":254,"rank":255,"stars":256,"starsToday":257,"headSha":258,"sources":259,"lines":260,"clones":261,"duplicatedLines":262,"percentage":263,"codePercentage":264,"codeSources":265,"healthScore":266,"healthGrade":267},"2026-11-03",8,38226,420,"0db5c31e10ecc426440b6fb0ce4bf85352faf1a7",46,9834,20,544,5.53,null,17,47.3,"D",{"date":254,"generatedAt":269,"name":250,"url":251,"description":270,"language":271,"stars":256,"starsToday":257,"defaultBranch":272,"headSha":258,"durationMs":273,"total":274,"formats":278,"topClones":307,"code":421,"health":494,"complexity":518,"deadCode":565},"2026-11-03T05:21:14.506Z","Training-free language model modification: Remove censorship, suppress slop, reduce sycophancy, and more","Python","master",1126,{"sources":259,"lines":260,"tokens":275,"clones":261,"duplicatedLines":262,"duplicatedTokens":276,"percentage":263,"percentageTokens":277},40652,1730,4.26,[279,286,293,298,302,305],{"format":280,"sources":281,"lines":282,"clones":283,"duplicatedLines":284,"percentage":285},"toml",16,1590,15,465,29.25,{"format":287,"sources":288,"lines":289,"clones":290,"duplicatedLines":291,"percentage":292},"python",23,7668,5,79,1.03,{"format":294,"sources":295,"lines":296,"clones":297,"duplicatedLines":297,"percentage":297},"markdown",4,498,0,{"format":299,"sources":300,"lines":301,"clones":297,"duplicatedLines":297,"percentage":297},"yaml",1,60,{"format":303,"sources":300,"lines":304,"clones":297,"duplicatedLines":297,"percentage":297},"bash",10,{"format":306,"sources":300,"lines":255,"clones":297,"duplicatedLines":297,"percentage":297},"text",[308,331,343,361,371,379,389,396,405,410],{"format":280,"lines":309,"tokens":310,"first":311,"others":314,"copies":319,"excerpt":320,"kind":330},54,153,{"name":312,"start":313,"end":301},"tests\u002Fgemma-4e\u002Fconfig.toml",7,[315,317],{"name":316,"start":313,"end":301},"tests\u002Fmistral-3\u002Fconfig.toml",{"name":318,"start":313,"end":301},"tests\u002Fqwen3.5-moe\u002Fconfig.toml",3,{"lines":321,"total":309},[322,323,324,325,326,324,327,328,329,324],"seed = 12345","print_debug_information = true","","batch_size = 2","max_response_length = 10","modifiers = [","    { plugin = \"heretic.modifiers.abliteration.Abliteration\" },","]","tests",{"format":280,"lines":332,"tokens":333,"first":334,"others":336,"copies":319,"excerpt":341,"kind":330},44,119,{"name":312,"start":313,"end":335},50,[337,339],{"name":338,"start":313,"end":335},"tests\u002Fminicpm5\u002Fconfig.toml",{"name":340,"start":313,"end":335},"tests\u002Fqwen2.5\u002Fconfig.toml",{"lines":342,"total":332},[322,323,324,325,326,324,327,328,329,324],{"format":280,"lines":344,"tokens":345,"first":346,"others":348,"copies":352,"excerpt":353,"kind":330},37,99,{"name":312,"start":347,"end":335},14,[349],{"name":350,"start":283,"end":351},"tests\u002Fseed-oss\u002Fconfig.toml",51,2,{"lines":354,"total":344},[328,329,324,355,356,324,357,358,359,360],"n_trials = 2","n_startup_trials = 1","export_strategy = \"merge\"","checkpoint_action = \"restart\"","trial_index = 0","model_action = \"save\"",{"format":280,"lines":362,"tokens":363,"first":364,"others":367,"copies":352,"kind":330},36,98,{"name":365,"start":347,"end":366},"tests\u002Fdeepseek-v4-ara\u002Fconfig.toml",49,[368],{"name":369,"start":265,"end":370},"tests\u002Fdeepseek-v4\u002Fconfig.toml",52,{"format":280,"lines":372,"tokens":373,"first":374,"others":375,"copies":352,"kind":330},34,96,{"name":312,"start":265,"end":335},[376],{"name":377,"start":378,"end":259},"tests\u002Fgpt-oss\u002Fconfig.toml",13,{"format":280,"lines":313,"tokens":380,"first":381,"others":384,"copies":352,"kind":388},92,{"name":382,"start":333,"end":383},"config.nosyco.toml",125,[385],{"name":382,"start":386,"end":387},140,146,"data",{"format":280,"lines":390,"tokens":391,"first":392,"others":393,"copies":352,"kind":330},30,87,{"name":365,"start":261,"end":366},[394],{"name":312,"start":395,"end":335},21,{"format":280,"lines":397,"tokens":398,"first":399,"others":402,"copies":352,"kind":330},27,84,{"name":365,"start":400,"end":401},33,59,[403],{"name":377,"start":390,"end":404},56,{"format":280,"lines":397,"tokens":398,"first":406,"others":408,"copies":352,"kind":330},{"name":369,"start":362,"end":407},62,[409],{"name":312,"start":372,"end":301},{"format":287,"lines":411,"tokens":291,"first":412,"others":416,"copies":352,"kind":420},22,{"name":413,"start":414,"end":415},"src\u002Fheretic\u002Fconfig.py",118,139,[417],{"name":413,"start":418,"end":419},160,181,"code",{"sources":265,"lines":422,"tokens":423,"clones":295,"duplicatedLines":424,"duplicatedTokens":425,"percentage":426,"percentageTokens":427,"formats":428,"topClones":430,"generated":492},7075,28573,69,272,0.98,0.95,[429],{"format":287,"sources":265,"lines":422,"clones":295,"duplicatedLines":424,"percentage":426},[431,445,466,484],{"format":287,"lines":411,"tokens":291,"first":432,"others":433,"copies":352,"excerpt":435,"kind":420},{"name":413,"start":414,"end":415},[434],{"name":413,"start":418,"end":419},{"lines":436,"total":411},[437,438,324,439,440,441,442,443,324,444],"    ),",")","@field_validator(\"instance_name\")","@classmethod","def validate_instance_name(cls, value: str | None) -> str | None:","    if value is None:","        return value","    if not value.strip():",{"format":287,"lines":281,"tokens":446,"first":447,"others":451,"copies":352,"excerpt":456,"kind":420},70,{"name":448,"start":449,"end":450},"src\u002Fheretic\u002Fmodifiers\u002Fabliteration.py",156,171,[452],{"name":453,"start":454,"end":455},"src\u002Fheretic\u002Fmodifiers\u002Fara.py",174,189,{"lines":457,"total":281},[458,459,324,460,461,462,463,464,465,324],"def init(self, ctx: Context) -> None:","    model = ctx.get_model()","    print()","    print(","        f\"Loading good prompts from [bold]{format_dataset_specification(self.settings.good_prompts)}[\u002F]...\"","    )","    good_prompts = ctx.load_prompts(self.settings.good_prompts)","    print(f\"* [bold]{len(good_prompts)}[\u002F] prompts loaded\")",{"format":287,"lines":467,"tokens":468,"first":469,"others":472,"copies":352,"excerpt":474,"kind":420},18,64,{"name":448,"start":470,"end":471},78,95,[473],{"name":453,"start":370,"end":424},{"lines":475,"total":467},[476,477,478,479,480,481,482,483,463,324],"class Settings(BaseModel):","    good_prompts: DatasetSpecification = Field(","        default=SingleDatasetSpecification(","            dataset=\"mlabonne\u002Fharmless_alpaca\",","            split=\"train[:400]\",","            column=\"text\",","        ),","        description=\"Dataset of prompts that tend to produce desirable responses.\",",{"format":287,"lines":378,"tokens":401,"first":485,"others":488,"copies":352,"kind":420},{"name":486,"start":487,"end":418},"src\u002Fheretic\u002Fscorers\u002Fbert_classifier.py",148,[489],{"name":490,"start":373,"end":491},"src\u002Fheretic\u002Fscorers\u002Fkeyword_rate.py",108,{"files":297,"minified":297,"sample":493},[],{"score":266,"grade":267,"size":495,"dimensions":497},{"lines":289,"files":288,"class":496},"S",[498,506,512],{"id":499,"source":500,"value":300,"adjusted":501,"lines":291,"halfLife":502,"formats":503,"excluded":504,"weight":300,"score":505},"duplication","jscpd",1.5,8.5,[287],[306,388],88.2,{"id":507,"source":500,"value":508,"adjusted":281,"lines":509,"halfLife":510,"weight":300,"score":511},"dead-code",19.3,1481,7.5,22.9,{"id":513,"source":500,"value":514,"adjusted":515,"lines":516,"halfLife":335,"weight":300,"score":517},"complexity",53.5,46.7,4100,52.3,{"total":519,"mean":520,"files":521},886,38.5,[522,527,532,537,541,545,550,553,558,562],{"path":523,"complexity":524,"lines":525,"bytes":526},"src\u002Fheretic\u002Fmain.py",197,1485,65364,{"path":528,"complexity":529,"lines":530,"bytes":531},"src\u002Fheretic\u002Fmodel.py",126,978,39102,{"path":533,"complexity":534,"lines":535,"bytes":536},"src\u002Fheretic\u002Futils.py",112,794,26969,{"path":538,"complexity":391,"lines":539,"bytes":540},"src\u002Fheretic\u002Fsystem.py",478,15825,{"path":542,"complexity":468,"lines":543,"bytes":544},"src\u002Fheretic\u002Fplugin.py",365,13126,{"path":546,"complexity":547,"lines":548,"bytes":549},"src\u002Fheretic\u002Freproduce.py",45,385,11953,{"path":448,"complexity":372,"lines":551,"bytes":552},466,19765,{"path":554,"complexity":555,"lines":556,"bytes":557},"src\u002Fheretic\u002Fevaluator.py",32,230,8042,{"path":453,"complexity":559,"lines":560,"bytes":561},25,396,16012,{"path":486,"complexity":411,"lines":563,"bytes":564},271,10220,{"percentage":566,"findings":313,"files":567,"byCategory":568,"largest":571},19.31,26,[569],{"category":570,"count":313},"unused-file",[572,573,574,575,577,580,583],{"category":570,"path":448,"name":324,"line":300,"lines":551},{"category":570,"path":453,"name":324,"line":300,"lines":560},{"category":570,"path":486,"name":324,"line":300,"lines":563},{"category":570,"path":490,"name":324,"line":300,"lines":576},157,{"category":570,"path":578,"name":324,"line":300,"lines":579},"src\u002Fheretic\u002Fscorers\u002Fkl_divergence.py",77,{"category":570,"path":581,"name":324,"line":300,"lines":582},"src\u002Fheretic\u002Fscorers\u002Fbenchmark_score.py",74,{"category":570,"path":584,"name":324,"line":300,"lines":585},"src\u002Fheretic\u002Fprogress.py",40,{"\u002Ftrending\u002Fp-e-w\u002Fheretic":587},{"views":297,"visits":297},1793688678963]