Syntax patterns: more more statistics.

Ruslan Shevchenko rssh at gradsoft.com.ua
Sun Apr 26 08:21:10 PDT 2009


 Good day, community.

 Next 'release' for syntax pattern and check tool.

Main changes:
  - added set of patterns, which more correctly describe elvis proposal
   Approriative names: elvis1 and NullSafe
   (see
http://mail.openjdk.java.net/pipermail/coin-dev/2009-April/001610.html
for details)
  - added checking for it.remove() inside for loop.
  - added set of patterns for widening integer proposal
    (see
http://mail.openjdk.java.net/pipermail/coin-dev/2009-April/001582.html
for details)
  - added set of patterns for counting loops with index access
   (see
http://mail.openjdk.java.net/pipermail/coin-dev/2009-April/001613.html
for details)
   - added count for all condition expressions.

Modofied JavaChecker installation which include new patterns can be
downloaded from
http://datacenter.gradsoft.ua/public.repository/ua.gradsoft/javachecker/installations/JavaCheckerSourceInstaller-2.5.0p3.jar

If anybody whant run checks on own dataset or/and add own check
definitions: all  procedure is the same as in my previous letter (see
http://mail.openjdk.java.net/pipermail/coin-dev/2009-April/001442.html)
except URL for last version

Note, that with all checks users quite run slow, so may be have sense to
run only checks you needed, not all.

Some results:

coin-jetty:
all bit ands    :       121
all conditional expressions     :       277
all catchs      :       281
all ifs :       764
all integer literals    :       2903
all traditional fors    :       315
big integer literals(undescores)        :       25
byte literal    :       52
catch in finally        :       3
elvis   :       43
elvis1  :       33
for loop from 0 to size or length       :       100
for with limit like it.next()   :       4
instanceof switch       :       8
invalid checker comments        :       0
loop with remove        :       0
multi catch     :       22
nullsafe call of fields and methods     :       35
object switch   :       31
rethrow clause  :       34
string in switch        :       19
widening operator (semantics)   :       10
widening operator (syntax)      :       20


hibernate:
all bit ands    :       2
all conditional expressions     :       792
all catchs      :       650
all ifs :       2410
all integer literals    :       3240
all traditional fors    :       708
big integer literals(undescores)        :       12
byte literal    :       1
catch in finally        :       27
elvis   :       182
elvis1  :       77
for loop from 0 to size or length       :       385
for with limit like it.next()   :       16
instanceof switch       :       28
loop with remove        :       12
multi catch     :       25
nullsafe call of fields and methods     :       175
object switch   :       94
rethrow clause  :       450
string in switch        :       86
widening operator (semantics)   :       0
widening operator (syntax)      :       0
Files:1372

openjdk:
all bit ands    :       6822
all conditional expressions     :       6770
all catchs      :       8411
all ifs :       28464
all integer literals    :       121919
all traditional fors    :       11530
big integer literals(undescores)        :       4589
byte literal    :       1452
catch in finally        :       103
elvis   :       880
elvis1  :       437
for loop from 0 to size or length       :       3137
for with limit like it.next()   :       235
instanceof switch       :       317
loop with remove        :       94
multi catch     :       412
nullsafe call of fields and methods     :       384
object switch   :       1360
rethrow clause  :       3267
string in switch        :       444
widening operator (semantics)   :       1090
widening operator (syntax)      :       1955
Files:9278

all bit ands    :       58
all conditional expressions     :       208
all catchs      :       171
all ifs :       735
all integer literals    :       2282
all traditional fors    :       271
big integer literals(undescores)        :       24
byte literal    :       2
catch in finally        :       2
elvis   :       30
elvis1  :       18
for loop from 0 to size or length       :       71
for with limit like it.next()   :       20
instanceof switch       :       6
loop with remove        :       7
multi catch     :       9
nullsafe call of fields and methods     :       66
object switch   :       27
rethrow clause  :       84
string in switch        :       10
widening operator (semantics)   :       0
widening operator (syntax)      :       2
Files:920

(btw, I plan to add result for compiere ERP, when understand their
building process)





More information about the coin-dev mailing list