@@ -36,8 +36,8 @@ Expr getAnAccessByDynamicCall(Method m) {
3636Expr getAMethodAccess ( Method m ) {
3737 result = getAnAccessByDynamicCall ( m ) or
3838 result = getAnAccessByReflection ( m ) or
39- result .( MethodCall ) .getTarget ( ) .getSourceDeclaration ( ) = m or
40- result .( MethodAccess ) .getTarget ( ) .getSourceDeclaration ( ) = m
39+ result .( MethodCall ) .getTarget ( ) .getUnboundDeclaration ( ) = m or
40+ result .( MethodAccess ) .getTarget ( ) .getUnboundDeclaration ( ) = m
4141}
4242
4343predicate potentiallyAccessedByForEach ( Method m ) {
@@ -63,7 +63,7 @@ predicate isRecursivelyLiveMethod(Method m) {
6363 or
6464 potentiallyAccessedByForEach ( m )
6565 or
66- isRecursivelyLiveMethod ( m .( ConstructedMethod ) .getSourceDeclaration ( ) )
66+ isRecursivelyLiveMethod ( m .( ConstructedMethod ) .getUnboundDeclaration ( ) )
6767 or
6868 nunitValueSource ( m )
6969 or
@@ -78,7 +78,7 @@ predicate nunitValueSource(Method m) {
7878}
7979
8080predicate nunitTestCaseSource ( Declaration f ) {
81- exists ( TestCaseSourceAttribute attribute | attribute .getSourceDeclaration ( ) = f )
81+ exists ( TestCaseSourceAttribute attribute | attribute .getUnboundDeclaration ( ) = f )
8282}
8383
8484predicate isDeadMethod ( Method m ) {
@@ -89,9 +89,9 @@ predicate isDeadMethod(Method m) {
8989predicate isDeadField ( Field f ) {
9090 f .isPrivate ( ) and
9191 not f .getDeclaringType ( ) instanceof AnonymousClass and
92- f .getSourceDeclaration ( ) = f and
92+ f .getUnboundDeclaration ( ) = f and
9393 not nunitTestCaseSource ( f ) and
94- forall ( FieldAccess fc | fc .getTarget ( ) .getSourceDeclaration ( ) = f |
94+ forall ( FieldAccess fc | fc .getTarget ( ) .getUnboundDeclaration ( ) = f |
9595 isDeadMethod ( fc .getEnclosingCallable ( ) )
9696 or
9797 not fc instanceof FieldRead and not fc .isRefArgument ( )
0 commit comments