use of net.sourceforge.pmd.stat.DataPoint in project pmd by pmd.
the class NPathComplexityRule method visit.
@Override
public Object visit(ASTTriggerUnit node, Object data) {
LOGGER.entering(CLASS_NAME, "visit(ASTTriggerUnit)");
int npath = complexityMultipleOf(node, 1, data);
DataPoint point = new DataPoint();
point.setNode(node);
point.setScore(1.0 * npath);
point.setMessage(getMessage());
addDataPoint(point);
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("NPath complexity: " + npath + " for line " + node.getBeginLine() + ", column " + node.getBeginColumn());
}
LOGGER.exiting(CLASS_NAME, "visit(ASTTriggerUnit)", npath);
return Integer.valueOf(npath);
}
Aggregations