Analyze your Java system with Moose

Moose is a cool open-source platform for software and data analysis ( Why cool? Because it lets you build all sorts of custom analyses very fast. Often minutes fast. Think of it as R with an highly interactive environment that is also specialized for software systems.

Let’s pick a couple of examples. Here is how you find all classes annotated with @Service that are being called from classes that have ‘ui’ in the qualified name:

model allClasses select: [:each |
  (each isAnnotatedWith: 'Service') and: [
    each clientTypes anySatisfy: [:c | '*ui*' match: c mooseName ] ] ]

And here is how you visualize the dependencies between a group of methods:

view nodes: methods.
view edges connectFromAll: #clientMethods.
view layout force

Rather concise. Combine this with a live environment and you can change the way you perceive legacy code.


In this hands-on session, you will have the chance of seeing Moose up close in action on concrete Java projects.