code: public int countDifferencesBetweenAnd(String first, String second) {
          if (first == null) {
              if (second == null) {
                  return 0;
              } else {
                  first = "";
              }
          } else if (second == null) {
              second = "";
          }
          LinkedList<DiffMatchPatch.Diff> diffs = getDiffs(first, second);
          int diffCount = 0;
          for (DiffMatchPatch.Diff diff : diffs) {
              if (diff.operation != DiffMatchPatch.Operation.EQUAL) {
                  diffCount++;
              }
          }
          return diffCount;
      }
docs: Determines number of differences (substrings that are not equal) between two strings.
  @param first first string to compare.
  @param second second string to compare.
  @return number of different substrings.