code: private boolean tagEquals(String tag1, String tag2) {
          if (caseSensitive) {
              return tag1.equals(tag2);
          }
  
          return tag1.equalsIgnoreCase(tag2);
      }
docs: Determine if the two specified tag names are equal.
  
  @param tag1 A tag name.
  @param tag2 A tag name.
  @return <code>true</code> if the tag names are equal, <code>false</code> otherwise.