Syntax patterns: more statistics.
scolebourne at joda.org
Fri Apr 24 09:40:36 PDT 2009
2009/4/24 Ruslan Shevchenko <rssh at gradsoft.com.ua>:
> And what mean 'does not work' ?
> Let's define some common small dataset.
These are the patterns that need to be identified for Elvis:
(a == null ? b : a)
(a != null ? a : b)
(null == a ? b : a)
(null != a ? a : b)
where a is any expression (occurs twice and is exactly the same in
both cases), and b is any expression. Ideally, these same patterns
should also be matched as if-statements, but that will be a lot
The null-safe operator patterns are more complex.
>> I should also note that the iterator remove() only catches remove()
>> within a while-statement, and not within an iterator-driven
> Yes. Will be fixed.
> (I guess iterator-driven for statement does not exist
> in life and usually written as while, but better check all, of course.)
Not so. About 50% of the remove() are in while-statement and 50% in
for-statement in the sourcebase I'm evaluating.
More information about the coin-dev