code: public static Map<String, Object> compareOriginalFactors(String refMathML, String compMathML) throws XPathExpressionException {
          try {
              CMMLInfo refDoc = new CMMLInfo(refMathML);
              CMMLInfo compDoc = new CMMLInfo(compMathML);
              // compute factors
              final Integer depth = compDoc.getDepth(refDoc.getXQuery());
              final Double coverage = compDoc.getCoverage(refDoc.getElements());
              Boolean formula = compDoc.isEquation(true);
              Boolean structMatch = compDoc.toStrictCmml().abstract2CDs()
                      .isMatch(refDoc.toStrictCmml().abstract2CDs().getXQuery());
              Boolean dataMatch = new CMMLInfo(compMathML).toStrictCmml().abstract2DTs()
                      .isMatch(new CMMLInfo(refMathML).toStrictCmml().abstract2DTs().getXQuery());
  
              HashMap<String, Object> result = new HashMap<>();
              result.put("depth", depth);
              result.put("coverage", coverage);
              result.put("structureMatch", structMatch);
              result.put("dataMatch", dataMatch);
              result.put("isEquation", formula);
              return result;
          } catch (Exception e) {
              // log and throw in this case
              logger.error(String.format("mathml comparison failed (refMathML: %s) (compMathML: %s)", refMathML, compMathML), e);
              throw e;
          }
      }
docs: Compare two MathML formulas. The return value is a map of similarity factors like matching depth,
  element coverage, indicator for structural or data match and if the comparison formula holds an
  equation.
  
  @param refMathML  Reference MathML string (must contain pMML and cMML)
  @param compMathML Comparison MathML string (must contain pMML and cMML)
  @return map of all found factors (depth, coverage, structureMatch, dataMatch, isEquation)
  @throws XPathExpressionException could hint towards a bug