Developer builds AI tool that ranks duplicate code by fix cost, not line count
A software developer has released dry-mcp, an open-source MCP server designed to detect and prioritize duplicated code by semantic meaning rather than token matching. Unlike traditional tools such as SonarQube, which flag duplication based on successive identical tokens, dry-mcp uses code embeddings to identify blocks that share the same logic even when variable names or languages differ. The tool ranks duplicate code by the cost of maintaining it — factoring in block size and copy count — rather than reporting a flat duplication percentage. Findings that resemble common language idioms or house-style patterns are automatically demoted to reduce noise. The tool is built to feed results directly to an AI coding agent, enabling automated fixes rather than requiring developers to manually review duplication dashboards.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in