Skip to main content

How to guides

How to guides

Introduction to type-aware code search

Imagine you're an author of a Java library. You've defined an abstract base class and you want to figure out if people are using a specific method defined in that class. It wouldn't be too difficult to search in the repository where the class was defined, but what if there are hundreds or thousands of repositories that are potentially using it or some subclass of it? Searching for the method name might return thousands of irrelevant matches. A human would certainly struggle to do this search within a reasonable amount of time.

How to find method invocations based on a pattern using AI

Searching for methods across a code base can not only help you learn more about how a particular method functions or how it's used in code, but it can also enable you to perform impact analysis across all of your repositories to see what depends on what. While this is normally a tricky problem due to the limitations of text-based searching, Moderne offers two recipes that allow you to easily and quickly search for methods – even if you don't know the exact name or parameters they're composed of.