Code Graph
A technique that uses static analysis to extract symbols, files, repositories and their relationships—such as references, calls and inheritance—from a codebase into graph-structured data, supporting precise cross-repository dependency tracking and reference queries.
Timeline (last 90 days)
The code index that Sourcegraph has long maintained is built on a code graph, enabling it to provide precise jump-to-definition and reference queries in large multi-repository environments.
The out-of-the-box graph tool returned zero callers for 17 out of 26 functions, despite every one of them having actual callers, and every empty result was labeled as precise with a risk level of LOW.
The author studied the open-source project Vite using another engine, which had a 67.9% probability of accurately naming callers, with all 185 call sites falling within some caller reported by that engine.
On the author's own TypeScript monorepo, an out-of-the-box code graph tool achieved a recall rate of only 57.4%, finding just 27 of 47 real callers.
Code graph accuracy should be measured using a real oracle on real repositories, because omissions only become apparent at scale.
The static analysis accuracy of code graphs is reduced by situations such as dynamic dispatch, re-exports, and reflective calls.
An empty caller list does not mean safety; it should be treated as unknown and the codebase should be searched.
All Facts (7)
The code index that Sourcegraph has long maintained is built on a code graph, enabling it to provide precise jump-to-definition and reference queries in large multi-repository environments.
50%UnverifiedThe out-of-the-box graph tool returned zero callers for 17 out of 26 functions, despite every one of them having actual callers, and every empty result was labeled as precise with a risk level of LOW.
50%UnverifiedThe author studied the open-source project Vite using another engine, which had a 67.9% probability of accurately naming callers, with all 185 call sites falling within some caller reported by that engine.
50%UnverifiedOn the author's own TypeScript monorepo, an out-of-the-box code graph tool achieved a recall rate of only 57.4%, finding just 27 of 47 real callers.
50%UnverifiedCode graph accuracy should be measured using a real oracle on real repositories, because omissions only become apparent at scale.
50%UnverifiedThe static analysis accuracy of code graphs is reduced by situations such as dynamic dispatch, re-exports, and reflective calls.
50%UnverifiedAn empty caller list does not mean safety; it should be treated as unknown and the codebase should be searched.
50%