Skip to content

Commit 37a274a

Browse files
Removed CLOSURE_ORIGINAL_NAME property (#1829)
For: ShiftLeftSecurity/codescience#8347
1 parent 045ea4a commit 37a274a

File tree

118 files changed

+1541
-1790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1541
-1790
lines changed

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/GraphSchema.scala

Lines changed: 928 additions & 933 deletions
Large diffs are not rendered by default.

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/Properties.scala

Lines changed: 43 additions & 48 deletions
Large diffs are not rendered by default.

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/PropertyNames.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ object PropertyNames {
4444
*/
4545
val ClosureBindingId: String = "CLOSURE_BINDING_ID"
4646

47-
/** Deprecated. Create an explict REF edge instead. Formerly the original name of the (potentially mangled) captured
48-
* variable
49-
*/
50-
val ClosureOriginalName: String = "CLOSURE_ORIGINAL_NAME"
51-
5247
/** This field holds the code snippet that the node represents. */
5348
val Code: String = "CODE"
5449

@@ -295,7 +290,6 @@ object PropertyNames {
295290
AstParentType,
296291
CanonicalName,
297292
ClosureBindingId,
298-
ClosureOriginalName,
299293
Code,
300294
ColumnNumber,
301295
ColumnNumberEnd,

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/accessors/Accessors.scala

Lines changed: 43 additions & 54 deletions
Large diffs are not rendered by default.

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/nodes/BaseTypes.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ trait HasCanonicalNameEMT
139139
*/
140140
trait HasClosureBindingIdEMT
141141

142-
/** Node types with this marker trait are guaranteed to have the CLOSURE_ORIGINAL_NAME property. EMT stands for: "erased
143-
* marker trait", it exists only at compile time in order to improve type safety.
144-
*/
145-
trait HasClosureOriginalNameEMT
146-
147142
/** Node types with this marker trait are guaranteed to have the CODE property. EMT stands for: "erased marker trait",
148143
* it exists only at compile time in order to improve type safety.
149144
*/

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/nodes/ClosureBinding.scala

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,14 @@ import scala.collection.mutable
77
/** Node base type for compiletime-only checks to improve type safety. EMT stands for: "erased marker trait", i.e. it is
88
* erased at runtime
99
*/
10-
trait ClosureBindingEMT
11-
extends AnyRef
12-
with HasClosureBindingIdEMT
13-
with HasClosureOriginalNameEMT
14-
with HasEvaluationStrategyEMT
10+
trait ClosureBindingEMT extends AnyRef with HasClosureBindingIdEMT with HasEvaluationStrategyEMT
1511

1612
trait ClosureBindingBase extends AbstractNode with StaticType[ClosureBindingEMT] {
1713

1814
override def propertiesMap: java.util.Map[String, Any] = {
1915
import io.shiftleft.codepropertygraph.generated.accessors.languagebootstrap.*
2016
val res = new java.util.HashMap[String, Any]()
2117
this.closureBindingId.foreach { p => res.put("CLOSURE_BINDING_ID", p) }
22-
this.closureOriginalName.foreach { p => res.put("CLOSURE_ORIGINAL_NAME", p) }
2318
if (("<empty>": String) != this.evaluationStrategy) res.put("EVALUATION_STRATEGY", this.evaluationStrategy)
2419
res
2520
}
@@ -34,9 +29,6 @@ object ClosureBinding {
3429
* ▸ ClosureBindingId (String); Cardinality `ZeroOrOne` (optional); Identifier which uniquely describes a
3530
* CLOSURE_BINDING. This property is used to match captured LOCAL nodes with the corresponding CLOSURE_BINDING nodes
3631
*
37-
* ▸ ClosureOriginalName (String); Cardinality `ZeroOrOne` (optional); Deprecated. Create an explict REF edge instead.
38-
* Formerly the original name of the (potentially mangled) captured variable
39-
*
4032
* ▸ EvaluationStrategy (String); Cardinality `one` (mandatory with default value `<empty>`); For formal method input
4133
* parameters, output parameters, and return parameters, this field holds the evaluation strategy, which is one of the
4234
* following: 1) `BY_REFERENCE` indicates that the parameter is passed by reference, 2) `BY_VALUE` indicates that it is
@@ -51,21 +43,19 @@ class ClosureBinding(graph_4762: flatgraph.Graph, seq_4762: Int)
5143
override def productElementName(n: Int): String =
5244
n match {
5345
case 0 => "closureBindingId"
54-
case 1 => "closureOriginalName"
55-
case 2 => "evaluationStrategy"
46+
case 1 => "evaluationStrategy"
5647
case _ => ""
5748
}
5849

5950
override def productElement(n: Int): Any =
6051
n match {
6152
case 0 => this.closureBindingId
62-
case 1 => this.closureOriginalName
63-
case 2 => this.evaluationStrategy
53+
case 1 => this.evaluationStrategy
6454
case _ => null
6555
}
6656

6757
override def productPrefix = "ClosureBinding"
68-
override def productArity = 3
58+
override def productArity = 2
6959

7060
override def canEqual(that: Any): Boolean = that != null && that.isInstanceOf[ClosureBinding]
7161
}

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/nodes/Finding.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ class Finding(graph_4762: flatgraph.Graph, seq_4762: Int)
4444
with FindingBase
4545
with StaticType[FindingEMT] {
4646
def evidence: IndexedSeq[StoredNode] =
47-
flatgraph.Accessors.getNodePropertyMulti[StoredNode](graph, nodeKind = nodeKind, propertyKind = 51, seq = seq)
47+
flatgraph.Accessors.getNodePropertyMulti[StoredNode](graph, nodeKind = nodeKind, propertyKind = 50, seq = seq)
4848
def keyValuePairs: IndexedSeq[KeyValuePair] =
49-
flatgraph.Accessors.getNodePropertyMulti[KeyValuePair](graph, nodeKind = nodeKind, propertyKind = 52, seq = seq)
49+
flatgraph.Accessors.getNodePropertyMulti[KeyValuePair](graph, nodeKind = nodeKind, propertyKind = 51, seq = seq)
5050

5151
override def productElementName(n: Int): String =
5252
n match {

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/nodes/NewAnnotation.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,14 +1553,14 @@ class NewAnnotation extends NewNode(nodeKind = 0) with AnnotationBase with Expre
15531553
override def countAndVisitProperties(interface: flatgraph.BatchedUpdateInterface): Unit = {
15541554
interface.countProperty(this, 1, 1)
15551555
interface.countProperty(this, 2, argumentName.size)
1556-
interface.countProperty(this, 8, 1)
1557-
interface.countProperty(this, 9, columnNumber.size)
1558-
interface.countProperty(this, 21, 1)
1559-
interface.countProperty(this, 34, lineNumber.size)
1560-
interface.countProperty(this, 38, 1)
1561-
interface.countProperty(this, 39, offset.size)
1562-
interface.countProperty(this, 40, offsetEnd.size)
1563-
interface.countProperty(this, 41, 1)
1556+
interface.countProperty(this, 7, 1)
1557+
interface.countProperty(this, 8, columnNumber.size)
1558+
interface.countProperty(this, 20, 1)
1559+
interface.countProperty(this, 33, lineNumber.size)
1560+
interface.countProperty(this, 37, 1)
1561+
interface.countProperty(this, 38, offset.size)
1562+
interface.countProperty(this, 39, offsetEnd.size)
1563+
interface.countProperty(this, 40, 1)
15641564
}
15651565

15661566
override def copy: this.type = {

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/nodes/NewAnnotationLiteral.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,13 +1526,13 @@ class NewAnnotationLiteral extends NewNode(nodeKind = 1) with AnnotationLiteralB
15261526
override def countAndVisitProperties(interface: flatgraph.BatchedUpdateInterface): Unit = {
15271527
interface.countProperty(this, 1, 1)
15281528
interface.countProperty(this, 2, argumentName.size)
1529-
interface.countProperty(this, 8, 1)
1530-
interface.countProperty(this, 9, columnNumber.size)
1531-
interface.countProperty(this, 34, lineNumber.size)
1532-
interface.countProperty(this, 38, 1)
1533-
interface.countProperty(this, 39, offset.size)
1534-
interface.countProperty(this, 40, offsetEnd.size)
1535-
interface.countProperty(this, 41, 1)
1529+
interface.countProperty(this, 7, 1)
1530+
interface.countProperty(this, 8, columnNumber.size)
1531+
interface.countProperty(this, 33, lineNumber.size)
1532+
interface.countProperty(this, 37, 1)
1533+
interface.countProperty(this, 38, offset.size)
1534+
interface.countProperty(this, 39, offsetEnd.size)
1535+
interface.countProperty(this, 40, 1)
15361536
}
15371537

15381538
override def copy: this.type = {

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/nodes/NewAnnotationParameter.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,12 +1438,12 @@ class NewAnnotationParameter extends NewNode(nodeKind = 2) with AnnotationParame
14381438
def offsetEnd(value: Option[Int]): this.type = { this.offsetEnd = value; this }
14391439
def order(value: Int): this.type = { this.order = value; this }
14401440
override def countAndVisitProperties(interface: flatgraph.BatchedUpdateInterface): Unit = {
1441-
interface.countProperty(this, 8, 1)
1442-
interface.countProperty(this, 9, columnNumber.size)
1443-
interface.countProperty(this, 34, lineNumber.size)
1444-
interface.countProperty(this, 39, offset.size)
1445-
interface.countProperty(this, 40, offsetEnd.size)
1446-
interface.countProperty(this, 41, 1)
1441+
interface.countProperty(this, 7, 1)
1442+
interface.countProperty(this, 8, columnNumber.size)
1443+
interface.countProperty(this, 33, lineNumber.size)
1444+
interface.countProperty(this, 38, offset.size)
1445+
interface.countProperty(this, 39, offsetEnd.size)
1446+
interface.countProperty(this, 40, 1)
14471447
}
14481448

14491449
override def copy: this.type = {

0 commit comments

Comments
 (0)