@Override public void execute(InputFile file, ParseUnit unit) { if (unit.getXref() == null) return; int numShrTT = 0, numShrDS = 0, numShrVar = 0; try { NodeList nodeList = (NodeList) shrTTExpr.evaluate(unit.getXref(), XPathConstants.NODESET); numShrTT = nodeList.getLength(); } catch (XPathExpressionException uncaught) { } try { NodeList nodeList = (NodeList) shrDSExpr.evaluate(unit.getXref(), XPathConstants.NODESET); numShrDS = nodeList.getLength(); } catch (XPathExpressionException uncaught) { } try { NodeList nodeList = (NodeList) shrVarExpr.evaluate(unit.getXref(), XPathConstants.NODESET); numShrVar = nodeList.getLength(); } catch (XPathExpressionException uncaught) { } reportMeasure(file, OpenEdgeMetrics.SHR_TT, numShrTT); reportMeasure(file, OpenEdgeMetrics.SHR_DS, numShrDS); reportMeasure(file, OpenEdgeMetrics.SHR_VAR, numShrVar); }