So here you only use modified once as I can see it (and I think I'd call it annotatedElement or something).  But also, you create it, use it once, and throw it.  I'd almost rather see. 


```
      Tree annotatedElement = ... path magic ...;
      if (isMethod(annotatedElement) && isAbstract(annotatedElement) {
        return true
      }
```

So you're using annotatedElement twice, and casting isMethod and isAbstract in terms of that annotated element. 

Now, that's if you are able to go from the annotatedElement (Tree) back to its flags reliably.  Bit if it's not a method, it should short circuit, and if it is, it should have the expected AST structure so it should be navigable from there.