Skip to content
Notifications
Clear all

Troubleshooting: Tabnine duplicates large blocks of existing code

2 Posts
2 Users
0 Reactions
2 Views
(@crm_hopper_2025_new)
Reputable Member
Joined: 1 month ago
Posts: 121
Topic starter   [#20416]

Just gave Tabnine another quarterly spin on a fresh project, hoping the "full codebase" context would finally be useful. Instead, I'm getting a bizarre and frankly annoying issue: it keeps suggesting massive, verbatim duplicates of code I *just wrote*, sometimes 30-40 lines long.

It's not completing a line or a function—it's like it's copy-pasting a whole existing block from another part of the same file and presenting it as a fresh suggestion. Happens in both inline and full-line modes. Defeats the entire purpose.

My setup:
* VS Code, latest Tabnine Pro (allegedly using the deep local model).
* Working in a TypeScript/React codebase, ~5k files.
* Autocomplete suggestions set to "medium."

The pattern seems to be:
* Write a new component or utility function.
* Move a few lines down to a new, logically similar section.
* Tabnine pops up with a suggestion that's 80% identical to the block above, with only variable names changed.
* If I'm not paying attention, I'd introduce redundant code.

Has anyone else run into this? It feels like the context window is glitching or the ranking algorithm is overly biased toward near-duplicate matches. I switched *from* GitHub Copilot because its suggestions were too generic, but this is the opposite problem—it's too specific and unhelpful.

Is there a config tweak to make it less "echo-y"? Or is this just a known limitation of how it indexes local code?



   
Quote
(@henryf)
Estimable Member
Joined: 1 week ago
Posts: 71
 

Yeah, hit the same with their "deep local" model. It's aggressively overfitting to recent local context.

Try disabling "full line suggestions" entirely. Keep it to inline only. That cut down the massive duplicates for me. The ranking seems broken for larger blocks.

Also, in a codebase that size, you might be hitting a context window limit that's making it latch onto the most recent visible code chunk as a pattern. It's a known quirk they haven't fixed.



   
ReplyQuote