You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9ede9b0
Browse filesBrowse the repository at this point in the historyBrowse files
feat(extractor): resolve pool Rent/Return via SemanticModel → aliased receivers (recall 6/9→7/10) (#53)
Pool Rent/Return recognition moves off the receiver-text heuristic
(Contains("Pool")) onto Roslyn symbol resolution: IsPoolRent /
PoolReturnBuffer bind the invoked method through the SemanticModel and check
its containing type is System.Buffers.ArrayPool<T> (new IsArrayPoolType). The
receiver may be spelled any way, so an aliased pool (var p =
ArrayPool<int>.Shared; p.Rent(...); p.Return(buf)) is recognised — a miss for
the text heuristic, and a false-match on an unrelated _connectionPool.Rent() is
ruled out.
The SemanticModel is threaded through LowerFlowBody -> LowerFlowStmt ->
EmitFlowExpr (and LowerSwitchSection). POOL001's Rent recognition now calls the
same IsPoolRent, so the syntactic and flow detectors share one definition.
ArrayPool-specific by design (MemoryPool<T>.Rent returns an IMemoryOwner<T>
released by Dispose, no Return to model).
New corpus case arraypool-aliased-receiver pins it: a double-return through an
aliased receiver, a miss under the old heuristic and a catch (OWN003) under the
semantic one. Recall 6/9 -> 7/10, specificity 10/10, 0 FP; CI floor --min-recall 7.
0 commit comments