When getting the wrapper for the root node, we must give the container of the root node, not the endpoint, because they won't necessarily be the same for functions contained within functions.
This commit is contained in:
Tiferet Gazit
2021-11-22 20:15:48 +00:00
committed by GitHub
parent e2ffba2e47
commit b493702a5a

View File

@@ -60,7 +60,7 @@ private string getTokenFeature(DataFlow::Node endpoint, string featureName) {
) and
rootNode =
NeighborhoodBodies::getNeighborhoodAstNode(Raw::astNode(endpoint.getAstNode()), thresh) and
rootNodeWrapped = DatabaseFeatures::astNode(Wrapped::astNode(endpoint.getContainer(), rootNode)) and
rootNodeWrapped = DatabaseFeatures::astNode(Wrapped::astNode(rootNode.getContainer(), rootNode)) and
result =
unique(string x |
x = NeighborhoodBodies::getBodyTokenFeatureForNeighborhoodNode(rootNodeWrapped)