private static int getInstantiationsCount(RefClass aClass) {
    if (!aClass.isAnonymous()) {
      int count = 0;

      for (RefMethod refConstructor : aClass.getConstructors()) {
        count += refConstructor.getInReferences().size();
      }

      for (RefClass subClass : aClass.getSubClasses()) {
        count += getInstantiationsCount(subClass);
        count -= subClass.getConstructors().size();
      }

      return count;
    }

    return 1;
  }
private static int getInstantiationsCount(RefClass aClass)