diff --git a/jacodb-core/src/main/kotlin/org/jacodb/impl/features/Usages.kt b/jacodb-core/src/main/kotlin/org/jacodb/impl/features/Usages.kt index adb29dde9..3271e7121 100644 --- a/jacodb-core/src/main/kotlin/org/jacodb/impl/features/Usages.kt +++ b/jacodb-core/src/main/kotlin/org/jacodb/impl/features/Usages.kt @@ -34,6 +34,7 @@ import org.jacodb.impl.storage.defaultBatchSize import org.jacodb.impl.storage.dslContext import org.jacodb.impl.storage.eqOrNull import org.jacodb.impl.storage.ers.filterDeleted +import org.jacodb.impl.storage.ers.filterLocations import org.jacodb.impl.storage.ers.toClassSource import org.jacodb.impl.storage.execute import org.jacodb.impl.storage.executeQueries @@ -279,11 +280,12 @@ object Usages : JcFeature { val locationId = callee.getCompressed("locationId")!! callee.getLinks("calls").map { it to locationId } } - .map { (call, _) -> + .map { (call, callerLocationId) -> val callerId = call.getCompressedBlob("callerId")!! val caller = symbolInterner.findSymbolName(callerId)!! val clazz = txn.find("Class", "nameId", callerId.compressed) .filterDeleted() + .filterLocations(callerLocationId) .first() val classId = clazz.id.instanceId UsageFeatureResponse(