File path: /jruby-1.4.0/src/org/jruby/runtime/builtin/InstanceVariableTable.java | File path: /jruby-1.4.0/src/org/jruby/runtime/builtin/InstanceVariableTable.java | |||
Method name: Object fetch(String)
|
Method name: Object fastFetch(String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (USE_PACKED_ARRAY) {↵ | 1 | if (USE_PACKED_ARRAY) {↵ | |
2 | if (packedVTable != null) return packedFetch(name);↵ | 2 | if (packedVTable != null) return fastPackedFetch(name);↵ | |
3 | } else if (USE_PACKED_FIELDS) {↵ | 3 | } else if (USE_PACKED_FIELDS) {↵ | |
4 | if (packedVFields != null) return packedVFields.fetch(name);↵ | 4 | if (packedVFields != null) return packedVFields.fastFetch(name);↵ | |
5 | }↵ | 5 | }↵ | |
6 | return hashFetch(name); | 6 | return fastHashFetch(name); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (USE_PACKED_ARRAY) | 1 | if (USE_PACKED_ARRAY) | |||||||||||||
2 | if (packedVTable != null) | 2 | if (packedVTable != null) | |||||||||||||
3 | return packedFetch(name); |
| 3 | return fastPackedFetch(name); | ||||||||||||
4 | else if (USE_PACKED_FIELDS) | 4 | else if (USE_PACKED_FIELDS) | |||||||||||||
5 | if (packedVFields != null) | 5 | if (packedVFields != null) | |||||||||||||
6 | return packedVFields.fetch(name); |
| 6 | return packedVFields.fastFetch(name); | ||||||||||||
7 | return hashFetch(name); |
| 7 | return fastHashFetch(name); |
Row | Violation |
---|---|
1 | Expression packedFetch(name) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression fastPackedFetch(name) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression packedVFields.fetch(name) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression packedVFields.fastFetch(name) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression hashFetch(name) cannot be parameterized, because it has dependencies to/from statements that will be extracted |