[{"data":1,"prerenderedAt":609},["ShallowReactive",2],{"navigation_docs":3,"trending-repo-jamwithai\u002Fproduction-agentic-rag-course":249,"page-views-\u002Ftrending\u002Fjamwithai\u002Fproduction-agentic-rag-course":607},[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},"jamwithai\u002Fproduction-agentic-rag-course","https:\u002F\u002Fgithub.com\u002Fjamwithai\u002Fproduction-agentic-rag-course",[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-10-04",8,9452,193,"424a0eb99edf841994f2a9a053912b489d2a94ff",134,15104,9,115,0.76,0.69,87,67.9,"C",{"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":316,"health":438,"complexity":467,"deadCode":516,"code":552,"measuredAt":605,"jscpdVersion":606},"2026-10-04T07:13:25.094Z","","Python","main",59,{"sources":259,"lines":260,"tokens":275,"clones":261,"duplicatedLines":262,"duplicatedTokens":276,"percentage":263,"percentageTokens":277},79487,672,0.85,[279,284,291,295,299,303,306,309,313],{"format":280,"sources":281,"lines":282,"clones":255,"duplicatedLines":265,"percentage":283},"python",94,10613,0.82,{"format":285,"sources":286,"lines":287,"clones":288,"duplicatedLines":289,"percentage":290},"yaml",3,417,1,28,6.71,{"format":292,"sources":261,"lines":293,"clones":294,"duplicatedLines":294,"percentage":294},"markdown",2641,0,{"format":296,"sources":297,"lines":298,"clones":294,"duplicatedLines":294,"percentage":294},"bash",16,897,{"format":300,"sources":301,"lines":302,"clones":294,"duplicatedLines":294,"percentage":294},"text",6,188,{"format":304,"sources":288,"lines":305,"clones":294,"duplicatedLines":294,"percentage":294},"perl",174,{"format":307,"sources":288,"lines":308,"clones":294,"duplicatedLines":294,"percentage":294},"toml",70,{"format":310,"sources":311,"lines":312,"clones":294,"duplicatedLines":294,"percentage":294},"json",2,69,{"format":314,"sources":311,"lines":315,"clones":294,"duplicatedLines":294,"percentage":294},"txt",35,[317,340,361,381,391,401,409,421,430],{"format":285,"lines":289,"tokens":318,"first":319,"others":323,"copies":311,"excerpt":327,"kind":339},135,{"name":320,"start":321,"end":322},"compose.yml",216,243,[324],{"name":320,"start":325,"end":326},267,294,{"lines":328,"total":289},[329,330,331,332,333,334,335,336,337,338],"SALT: ${LANGFUSE_SALT}","ENCRYPTION_KEY: ${LANGFUSE_ENCRYPTION_KEY}","TELEMETRY_ENABLED: \"false\"","LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: \"true\"","CLICKHOUSE_MIGRATION_URL: clickhouse:\u002F\u002Fclickhouse:9000","CLICKHOUSE_URL: http:\u002F\u002Fclickhouse:8123","CLICKHOUSE_USER: langfuse","CLICKHOUSE_PASSWORD: langfuse","CLICKHOUSE_CLUSTER_ENABLED: \"false\"","LANGFUSE_USE_AZURE_BLOB: \"false\"","data",{"format":280,"lines":297,"tokens":341,"first":342,"others":346,"copies":311,"excerpt":350,"kind":360},97,{"name":343,"start":344,"end":345},"src\u002Fservices\u002Farxiv\u002Fclient.py",107,122,[347],{"name":343,"start":348,"end":349},182,197,{"lines":351,"total":297},[352,353,354,355,356,357,270,358,270,359],"# Add rate limiting delay between all requests (arXiv recommends 3 seconds)","if self._last_request_time is not None:","    time_since_last = time.time() - self._last_request_time","    if time_since_last \u003C self.rate_limit_delay:","        sleep_time = self.rate_limit_delay - time_since_last","        await asyncio.sleep(sleep_time)","self._last_request_time = time.time()","async with httpx.AsyncClient(timeout=self.timeout_seconds) as client:","code",{"format":280,"lines":301,"tokens":362,"first":363,"others":366,"copies":311,"excerpt":370,"excerptSecond":378,"kind":360},78,{"name":364,"start":365,"end":297},"src\u002Fschemas\u002Farxiv\u002Fpaper.py",11,[367],{"name":364,"start":368,"end":369},22,27,{"lines":371,"total":301},[372,373,374,375,376,377],"arxiv_id: str = Field(..., description=\"arXiv paper ID\")","title: str = Field(..., description=\"Paper title\")","authors: List[str] = Field(..., description=\"List of author names\")","abstract: str = Field(..., description=\"Paper abstract\")","categories: List[str] = Field(..., description=\"Paper categories\")","published_date: str = Field(..., description=\"Date published on arXiv (ISO format)\")",{"lines":379,"total":301},[372,373,374,375,376,380],"published_date: datetime = Field(..., description=\"Date published on arXiv\")",{"format":280,"lines":255,"tokens":382,"first":383,"others":387,"copies":311,"kind":360},74,{"name":384,"start":385,"end":386},"src\u002Fservices\u002Fopensearch\u002Fclient.py",165,172,[388],{"name":384,"start":389,"end":390},232,239,{"format":280,"lines":255,"tokens":392,"first":393,"others":397,"copies":311,"kind":360},65,{"name":394,"start":395,"end":396},"src\u002Fservices\u002Findexing\u002Ftext_chunker.py",250,257,[398],{"name":394,"start":399,"end":400},266,273,{"format":280,"lines":402,"tokens":403,"first":404,"others":406,"copies":311,"kind":360},15,63,{"name":343,"start":345,"end":405},136,[407],{"name":343,"start":349,"end":408},211,{"format":280,"lines":410,"tokens":411,"first":412,"others":416,"copies":311,"kind":420},13,58,{"name":413,"start":414,"end":415},"tests\u002Funit\u002Fservices\u002Fagents\u002Ftest_nodes.py",104,116,[417],{"name":413,"start":418,"end":419},125,137,"tests",{"format":280,"lines":261,"tokens":422,"first":423,"others":426,"copies":311,"kind":420},52,{"name":424,"start":425,"end":392},"tests\u002Funit\u002Fservices\u002Ftest_arxiv_client.py",57,[427],{"name":424,"start":428,"end":429},76,84,{"format":280,"lines":431,"tokens":432,"first":433,"others":435,"copies":311,"kind":360},12,50,{"name":434,"start":365,"end":368},"src\u002Fservices\u002Fembeddings\u002Ffactory.py",[436],{"name":434,"start":289,"end":437},39,{"score":266,"grade":267,"size":439,"dimensions":443},{"lines":440,"files":441,"class":442},11434,103,"M",[444,453,462],{"id":445,"source":446,"value":447,"adjusted":448,"lines":265,"halfLife":449,"formats":450,"excluded":451,"weight":288,"score":452},"duplication","jscpd",0.8,1.2,8.5,[280,296,304],[300,339],90.9,{"id":454,"source":446,"value":455,"adjusted":456,"lines":457,"halfLife":458,"coverage":459,"weight":460,"score":461},"dead-code",11.8,10.4,1249,7.5,92.8,0.928,38.2,{"id":463,"source":446,"value":464,"adjusted":456,"lines":465,"halfLife":432,"weight":288,"score":466},"complexity",8.6,982,86.5,{"total":468,"mean":469,"files":470},1091,10.6,[471,475,479,484,489,493,498,503,506,511],{"path":343,"complexity":472,"lines":473,"bytes":474},73,493,18112,{"path":394,"complexity":476,"lines":477,"bytes":478},71,489,19271,{"path":480,"complexity":481,"lines":482,"bytes":483},"src\u002Fservices\u002Follama\u002Fclient.py",49,306,12494,{"path":485,"complexity":486,"lines":487,"bytes":488},"src\u002Fservices\u002Fmetadata_fetcher.py",47,436,18533,{"path":384,"complexity":490,"lines":491,"bytes":492},46,395,14905,{"path":494,"complexity":495,"lines":496,"bytes":497},"src\u002Fservices\u002Flangfuse\u002Fclient.py",44,383,12815,{"path":499,"complexity":500,"lines":501,"bytes":502},"src\u002Fservices\u002Fagents\u002Fagentic_rag.py",42,464,18184,{"path":504,"complexity":315,"lines":400,"bytes":505},"src\u002Frouters\u002Fask.py",11582,{"path":507,"complexity":508,"lines":509,"bytes":510},"src\u002Fservices\u002Ftelegram\u002Fbot.py",34,229,8926,{"path":512,"complexity":513,"lines":514,"bytes":515},"src\u002Fgradio_app.py",29,230,9549,{"percentage":517,"findings":518,"files":519,"byCategory":520,"largest":528},11.78,38,121,[521,524,526],{"category":522,"count":523},"unused-file",10,{"category":525,"count":410},"unused-export",{"category":527,"count":402},"unused-import",[529,530,533,535,537,540,542,545,547,550],{"category":522,"path":394,"name":270,"line":288,"lines":477},{"category":522,"path":531,"name":270,"line":288,"lines":532},"src\u002Fservices\u002Findexing\u002Fhybrid_indexer.py",170,{"category":522,"path":534,"name":270,"line":288,"lines":418},"airflow\u002Fdags\u002Farxiv_ingestion\u002Findexing.py",{"category":522,"path":536,"name":270,"line":288,"lines":428},"airflow\u002Fdags\u002Farxiv_ingestion\u002Freporting.py",{"category":522,"path":538,"name":270,"line":288,"lines":539},"airflow\u002Fdags\u002Farxiv_paper_ingestion.py",75,{"category":522,"path":541,"name":270,"line":288,"lines":382},"airflow\u002Fdags\u002Farxiv_ingestion\u002Ffetching.py",{"category":522,"path":543,"name":270,"line":288,"lines":544},"airflow\u002Fdags\u002Fhello_world_dag.py",68,{"category":522,"path":546,"name":270,"line":288,"lines":315},"src\u002Fservices\u002Findexing\u002Ffactory.py",{"category":522,"path":548,"name":270,"line":288,"lines":549},"src\u002Fmiddlewares.py",24,{"category":522,"path":551,"name":270,"line":288,"lines":368},"src\u002Fdatabase.py",{"sources":265,"lines":553,"tokens":554,"clones":301,"duplicatedLines":392,"duplicatedTokens":555,"percentage":264,"percentageTokens":556,"formats":557,"topClones":564,"generated":603},9477,45768,427,0.93,[558,561,563],{"format":280,"sources":428,"lines":559,"clones":301,"duplicatedLines":392,"percentage":560},8628,0.75,{"format":296,"sources":523,"lines":562,"clones":294,"duplicatedLines":294,"percentage":294},675,{"format":304,"sources":288,"lines":305,"clones":294,"duplicatedLines":294,"percentage":294},[565,571,579,591,595,599],{"format":280,"lines":297,"tokens":341,"first":566,"others":567,"copies":311,"excerpt":569,"kind":360},{"name":343,"start":344,"end":345},[568],{"name":343,"start":348,"end":349},{"lines":570,"total":297},[352,353,354,355,356,357,270,358,270,359],{"format":280,"lines":301,"tokens":362,"first":572,"others":573,"copies":311,"excerpt":575,"excerptSecond":577,"kind":360},{"name":364,"start":365,"end":297},[574],{"name":364,"start":368,"end":369},{"lines":576,"total":301},[372,373,374,375,376,377],{"lines":578,"total":301},[372,373,374,375,376,380],{"format":280,"lines":255,"tokens":382,"first":580,"others":581,"copies":311,"excerpt":583,"kind":360},{"name":384,"start":385,"end":386},[582],{"name":384,"start":389,"end":390},{"lines":584,"total":255},[585,270,586,270,587,588,589,590],"response = self.client.search(index=self.index_name, body=search_body)","results = {\"total\": response[\"hits\"][\"total\"][\"value\"], \"hits\": []}","for hit in response[\"hits\"][\"hits\"]:","    chunk = hit[\"_source\"]","    chunk[\"score\"] = hit[\"_score\"]","    chunk[\"chunk_id\"] = hit[\"_id\"]",{"format":280,"lines":255,"tokens":392,"first":592,"others":593,"copies":311,"kind":360},{"name":394,"start":395,"end":396},[594],{"name":394,"start":399,"end":400},{"format":280,"lines":402,"tokens":403,"first":596,"others":597,"copies":311,"kind":360},{"name":343,"start":345,"end":405},[598],{"name":343,"start":349,"end":408},{"format":280,"lines":431,"tokens":432,"first":600,"others":601,"copies":311,"kind":360},{"name":434,"start":365,"end":368},[602],{"name":434,"start":289,"end":437},{"files":294,"minified":294,"sample":604},[],"2026-10-07T05:27:10.915Z","5.4.0",{"\u002Ftrending\u002Fjamwithai\u002Fproduction-agentic-rag-course":608},{"views":286,"visits":286},1795510259300]