Hi Klaus,
You can limit the number of results for all queries in Preferences > SemmleCode.
Or you can achieve something similar with the following query:
class SourceMetricMethod extends MetricCallable {
SourceMetricMethod() {
this.fromSource() and
this instanceof Method and
this.getName() != "<clinit>"
}
}
from SourceMetricMethod m, int n
where n = m.getNumberOfLines() and
count(SourceMetricMethod m | m.getNumberOfLines() > n) < 10
select m, n order by n desc
In that case however, you may get slightly more than 10 results if there are large methods with the same number of lines.
As for ruling out blank lines and comments, we will add that soon.
Hope it helps.