TreeRanker: Fast and Model-agnostic Ranking System for Code Suggestions in IDEs
Daniele Cipollone, Egor Bogomolov, Arie van Deursen, Maliheh Izadi

TL;DR
TreeRanker introduces a fast, model-agnostic ranking method for code suggestions in IDEs, leveraging prefix trees and token-level scoring to improve prediction relevance without complex decoding.
Contribution
It proposes a novel, lightweight, and architecture-agnostic ranking approach using prefix trees and greedy decoding for static code completions.
Findings
Enables precise token-aware ranking without beam search.
Compatible with existing language models and IDEs.
Improves relevance of code suggestions in IDEs.
Abstract
Token-level code completion is one of the most critical features in modern Integrated Development Environments (IDEs). It assists developers by suggesting relevant identifiers and APIs during coding. While completions are typically derived from static analysis, their usefulness depends heavily on how they are ranked, as correct predictions buried deep in the list are rarely seen by users. Most current systems rely on hand-crafted heuristics or lightweight machine learning models trained on user logs, which can be further improved to capture context information and generalize across projects and coding styles. In this work, we propose a new scoring approach to ranking static completions using language models in a lightweight and model-agnostic way. Our method organizes all valid completions into a prefix tree and performs a single greedy decoding pass to collect token-level scores across…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
