The value is not always zero. statementsMeasure.getValue() returns the total number of statements in the given file. That information is always available for all files in "sonar.sources" along with other metrics such as "lines", "lines of code", "methods", etc