code: private static boolean compareDistance(final String title1, final String title2, int distance) {
          return StringUtils.getLevenshteinDistance(title1, title2) <= distance;
      }
docs: Compare the Levenshtein Distance between the two strings
  
  @param title1 title
  @param title2 title
  @param distance max distance