@@ -120,7 +120,7 @@ private MethodBase getAMethod(ModuleBase mod, boolean instance) {
120
120
if result instanceof SingletonMethod then instance = false else instance = true
121
121
or
122
122
exists ( SingletonClass cls |
123
- cls .getValue ( ) .( SelfVariableAccess ) .getCfgScope ( ) = mod and
123
+ cls .getValue ( ) .( SelfVariableAccess ) .getVariable ( ) . getDeclaringScope ( ) = mod and
124
124
result = cls .getAMethod ( ) .( Method ) and
125
125
instance = false
126
126
)
@@ -133,7 +133,7 @@ private MethodBase getAMethod(ModuleBase mod, boolean instance) {
133
133
pragma [ nomagic]
134
134
private Node fieldPredecessor ( ModuleBase mod , boolean instance , string field ) {
135
135
exists ( InstanceVariableWriteAccess access , AssignExpr assign |
136
- access .getReceiver ( ) .getCfgScope ( ) = getAMethod ( mod , instance ) and
136
+ access .getReceiver ( ) .getVariable ( ) . getDeclaringScope ( ) = getAMethod ( mod , instance ) and
137
137
field = access .getVariable ( ) .getName ( ) and
138
138
assign .getLeftOperand ( ) = access and
139
139
result .asExpr ( ) .getExpr ( ) = assign .getRightOperand ( )
@@ -147,7 +147,7 @@ private Node fieldPredecessor(ModuleBase mod, boolean instance, string field) {
147
147
pragma [ nomagic]
148
148
private Node fieldSuccessor ( ModuleBase mod , boolean instance , string field ) {
149
149
exists ( InstanceVariableReadAccess access |
150
- access .getReceiver ( ) .getCfgScope ( ) = getAMethod ( mod , instance ) and
150
+ access .getReceiver ( ) .getVariable ( ) . getDeclaringScope ( ) = getAMethod ( mod , instance ) and
151
151
result .asExpr ( ) .getExpr ( ) = access and
152
152
field = access .getVariable ( ) .getName ( )
153
153
)
0 commit comments