@@ -120,7 +120,7 @@ private MethodBase getAMethod(ModuleBase mod, boolean instance) {
120120 if result instanceof SingletonMethod then instance = false else instance = true
121121 or
122122 exists ( SingletonClass cls |
123- cls .getValue ( ) .( SelfVariableAccess ) .getCfgScope ( ) = mod and
123+ cls .getValue ( ) .( SelfVariableAccess ) .getVariable ( ) . getDeclaringScope ( ) = mod and
124124 result = cls .getAMethod ( ) .( Method ) and
125125 instance = false
126126 )
@@ -133,7 +133,7 @@ private MethodBase getAMethod(ModuleBase mod, boolean instance) {
133133pragma [ nomagic]
134134private Node fieldPredecessor ( ModuleBase mod , boolean instance , string field ) {
135135 exists ( InstanceVariableWriteAccess access , AssignExpr assign |
136- access .getReceiver ( ) .getCfgScope ( ) = getAMethod ( mod , instance ) and
136+ access .getReceiver ( ) .getVariable ( ) . getDeclaringScope ( ) = getAMethod ( mod , instance ) and
137137 field = access .getVariable ( ) .getName ( ) and
138138 assign .getLeftOperand ( ) = access and
139139 result .asExpr ( ) .getExpr ( ) = assign .getRightOperand ( )
@@ -147,7 +147,7 @@ private Node fieldPredecessor(ModuleBase mod, boolean instance, string field) {
147147pragma [ nomagic]
148148private Node fieldSuccessor ( ModuleBase mod , boolean instance , string field ) {
149149 exists ( InstanceVariableReadAccess access |
150- access .getReceiver ( ) .getCfgScope ( ) = getAMethod ( mod , instance ) and
150+ access .getReceiver ( ) .getVariable ( ) . getDeclaringScope ( ) = getAMethod ( mod , instance ) and
151151 result .asExpr ( ) .getExpr ( ) = access and
152152 field = access .getVariable ( ) .getName ( )
153153 )
0 commit comments