code: public static List<Match> compareIdenticalMathML(String refMathML, String compMathML) throws MathNodeException {
          // switch from a string > CMMLInfo document > MathNode tree
          MathNode refMathNode;
          MathNode compMathNode;
          try {
              refMathNode = MathNodeGenerator.generateMathNode(new CMMLInfo(refMathML));
          } catch (MathNodeException e) {
              throw new MathNodeException("could not create math node for reference mathml: " + refMathML, e);
          }
          try {
              compMathNode = MathNodeGenerator.generateMathNode(new CMMLInfo(compMathML));
          } catch (MathNodeException e) {
              throw new MathNodeException("could not create math node for comparison mathml: " + compMathML, e);
          }
          return new SubTreeComparison(SimilarityType.identical).getSimilarities(refMathNode, compMathNode, true);
      }
docs: Compare two MathML formulas against each other. The MathML string will be transformed into a {@link CMMLInfo}
  document and then to a {@link MathNode} tree.
  <br/>
  The formulas are compared to find identical structures.
  
  @param refMathML  Reference MathML string (must contain pMML and cMML)
  @param compMathML Comparison MathML string (must contain pMML and cMML)
  @return list of matches / similarities, list can be empty.