diff --git a/build.sbt b/build.sbt index 20dcf876e..e483beed7 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ name := "codepropertygraph" // parsed by project/Versions.scala, updated by updateDependencies.sh -val flatgraphVersion = "0.1.24" +val flatgraphVersion = "0.1.25" inThisBuild( List( diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Call.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Call.scala index 33e10e97a..63f084367 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Call.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Call.scala @@ -330,7 +330,7 @@ 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] + def _methodViaCallOut: Iterator[nodes.Method] = staticCallOut.collectAll[nodes.Method] /** Traverse to METHOD via CONTAINS IN edge. */ @@ -568,8 +568,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] @@ -604,6 +602,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] } @@ -1170,8 +1170,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) @@ -1206,5 +1204,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) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Method.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Method.scala index e76fc91e5..59c2b773d 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Method.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Method.scala @@ -27,7 +27,7 @@ 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] + def _callViaCallIn: Iterator[nodes.Call] = staticCallIn.collectAll[nodes.Call] /** Traverse to CALL via CONTAINS OUT edge. */ @@ -306,8 +306,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] @@ -324,6 +322,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] } @@ -614,8 +614,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) @@ -632,5 +630,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) } diff --git a/schema/src/main/scala/io/shiftleft/codepropertygraph/schema/CallGraph.scala b/schema/src/main/scala/io/shiftleft/codepropertygraph/schema/CallGraph.scala index 7aaaf1929..917a015c8 100644 --- a/schema/src/main/scala/io/shiftleft/codepropertygraph/schema/CallGraph.scala +++ b/schema/src/main/scala/io/shiftleft/codepropertygraph/schema/CallGraph.scala @@ -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