Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name := "codepropertygraph"

// parsed by project/Versions.scala, updated by updateDependencies.sh
val flatgraphVersion = "0.1.24"
val flatgraphVersion = "0.1.24+3-441a43e7"

inThisBuild(
List(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,12 @@ final class AccessNeighborsForCall(val node: nodes.Call) extends AnyVal {

/** Traverse to METHOD via CALL OUT edge.
*/
def _methodViaCallOut: Iterator[nodes.Method] = callOut.collectAll[nodes.Method]
@deprecated("please use staticCallOut instead")
def _methodViaCallOut: Iterator[nodes.Method] = staticCallOut

/** Traverse to METHOD via CALL OUT edge.
*/
def staticCallOut: Iterator[nodes.Method] = staticCallOut.collectAll[nodes.Method]

/** Traverse to METHOD via CONTAINS IN edge.
*/
Expand Down Expand Up @@ -568,8 +573,6 @@ final class AccessNeighborsForCall(val node: nodes.Call) extends AnyVal {

def astOut: Iterator[nodes.Expression] = node._astOut.cast[nodes.Expression]

def callOut: Iterator[nodes.Method] = node._callOut.cast[nodes.Method]

def cdgIn: Iterator[nodes.CfgNode] = node._cdgIn.cast[nodes.CfgNode]

def cdgOut: Iterator[nodes.CfgNode] = node._cdgOut.cast[nodes.CfgNode]
Expand Down Expand Up @@ -604,6 +607,8 @@ final class AccessNeighborsForCall(val node: nodes.Call) extends AnyVal {

def refOut: Iterator[nodes.Member] = node._refOut.cast[nodes.Member]

def staticCallOut: Iterator[nodes.Method] = node._callOut.cast[nodes.Method]

def taggedByOut: Iterator[nodes.Tag] = node._taggedByOut.cast[nodes.Tag]
}

Expand Down Expand Up @@ -932,6 +937,11 @@ final class AccessNeighborsForCallTraversal(val traversal: Iterator[nodes.Call])

/** Traverse to METHOD via CALL OUT edge.
*/
def staticCallOut: Iterator[nodes.Method] = traversal.flatMap(_.staticCallOut)

/** Traverse to METHOD via CALL OUT edge.
*/
@deprecated("please use staticCallOut instead")
def _methodViaCallOut: Iterator[nodes.Method] = traversal.flatMap(_._methodViaCallOut)

/** Traverse to METHOD via CONTAINS IN edge.
Expand Down Expand Up @@ -1170,8 +1180,6 @@ final class AccessNeighborsForCallTraversal(val traversal: Iterator[nodes.Call])

def astOut: Iterator[nodes.Expression] = traversal.flatMap(_.astOut)

def callOut: Iterator[nodes.Method] = traversal.flatMap(_.callOut)

def cdgIn: Iterator[nodes.CfgNode] = traversal.flatMap(_.cdgIn)

def cdgOut: Iterator[nodes.CfgNode] = traversal.flatMap(_.cdgOut)
Expand Down Expand Up @@ -1206,5 +1214,7 @@ final class AccessNeighborsForCallTraversal(val traversal: Iterator[nodes.Call])

def refOut: Iterator[nodes.Member] = traversal.flatMap(_.refOut)

def staticCallOut: Iterator[nodes.Method] = traversal.flatMap(_.staticCallOut)

def taggedByOut: Iterator[nodes.Tag] = traversal.flatMap(_.taggedByOut)
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ final class AccessNeighborsForMethod(val node: nodes.Method) extends AnyVal {

/** Traverse to CALL via CALL IN edge.
*/
def _callViaCallIn: Iterator[nodes.Call] = callIn.collectAll[nodes.Call]
@deprecated("please use staticCallIn instead")
def _callViaCallIn: Iterator[nodes.Call] = staticCallIn

/** Traverse to CALL via CALL IN edge.
*/
def staticCallIn: Iterator[nodes.Call] = staticCallIn.collectAll[nodes.Call]

/** Traverse to CALL via CONTAINS OUT edge.
*/
Expand Down Expand Up @@ -306,8 +311,6 @@ final class AccessNeighborsForMethod(val node: nodes.Method) extends AnyVal {

def astOut: Iterator[nodes.AstNode] = node._astOut.cast[nodes.AstNode]

def callIn: Iterator[nodes.Call] = node._callIn.cast[nodes.Call]

def cfgOut: Iterator[nodes.AstNode] = node._cfgOut.cast[nodes.AstNode]

def containsIn: Iterator[nodes.AstNode] = node._containsIn.cast[nodes.AstNode]
Expand All @@ -324,6 +327,8 @@ final class AccessNeighborsForMethod(val node: nodes.Method) extends AnyVal {

def sourceFileOut: Iterator[nodes.File] = node._sourceFileOut.cast[nodes.File]

def staticCallIn: Iterator[nodes.Call] = node._callIn.cast[nodes.Call]

def taggedByOut: Iterator[nodes.Tag] = node._taggedByOut.cast[nodes.Tag]
}

Expand Down Expand Up @@ -351,6 +356,11 @@ final class AccessNeighborsForMethodTraversal(val traversal: Iterator[nodes.Meth

/** Traverse to CALL via CALL IN edge.
*/
def staticCallIn: Iterator[nodes.Call] = traversal.flatMap(_.staticCallIn)

/** Traverse to CALL via CALL IN edge.
*/
@deprecated("please use staticCallIn instead")
def _callViaCallIn: Iterator[nodes.Call] = traversal.flatMap(_._callViaCallIn)

/** Traverse to CALL via CONTAINS OUT edge.
Expand Down Expand Up @@ -614,8 +624,6 @@ final class AccessNeighborsForMethodTraversal(val traversal: Iterator[nodes.Meth

def astOut: Iterator[nodes.AstNode] = traversal.flatMap(_.astOut)

def callIn: Iterator[nodes.Call] = traversal.flatMap(_.callIn)

def cfgOut: Iterator[nodes.AstNode] = traversal.flatMap(_.cfgOut)

def containsIn: Iterator[nodes.AstNode] = traversal.flatMap(_.containsIn)
Expand All @@ -632,5 +640,7 @@ final class AccessNeighborsForMethodTraversal(val traversal: Iterator[nodes.Meth

def sourceFileOut: Iterator[nodes.File] = traversal.flatMap(_.sourceFileOut)

def staticCallIn: Iterator[nodes.Call] = traversal.flatMap(_.staticCallIn)

def taggedByOut: Iterator[nodes.Tag] = traversal.flatMap(_.taggedByOut)
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ object CallGraph extends SchemaBase {
|automatically as the CPG is first loaded.
|""".stripMargin
)
.withDefaultAccessorName("STATIC_CALL")
.protoId(ProtoIds.CallEdge)

val argument = builder
Expand Down Expand Up @@ -194,7 +195,7 @@ object CallGraph extends SchemaBase {
.addProperties(dispatchType, staticReceiver)

callNode
.addOutEdge(edge = call, inNode = method)
.addOutEdge(edge = call, inNode = method, stepNameIn = "staticCallIn", stepNameOut = "staticCallOut")

callNode
.addProperty(methodFullName)
Expand Down
Loading