1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Java-language backend: scope model, AbcSize, used-once/never-used.
//!
//! Metric spec (mirrors the Rust backend's semantics where a direct
//! analogue exists):
//! - Units: every `method_declaration` and `constructor_declaration`.
//! Lambdas and anonymous class bodies roll into the enclosing unit.
//! - A: local variable declarators (+1 per declared name), plain
//! assignments to variables, augmented assignments, enhanced-for
//! heads.
//! - B: method invocations, constructor calls (`new`), explicit
//! constructor invocations, unary operators, arithmetic/bitwise/
//! shift binary operators.
//! - C: if / for / enhanced-for / while / do, every switch label,
//! catch clauses, ternaries, comparisons, `&&`/`||`, `instanceof`.
//! - UsedOnce: single plain write, pure RHS, straight-line write,
//! single read after the write. Parameters, catch/resources
//! bindings and enhanced-for heads are protocol, never candidates.
//! - NeverUsed: written but never read, reported at the first write;
//! same exclusions.
use crateScope;
pub
use Tree;
pub use ;